uaveiro-leci/1ano/1semestre/fp/aula05/shorten.py

12 lines
234 B
Python
Raw Normal View History

2022-10-20 21:22:14 +00:00
def main():
print(shorten("Universidade de Aveiro"))
print(shorten("United Nations Organization"))
2022-11-10 23:20:38 +00:00
2022-10-20 21:22:14 +00:00
def shorten(string):
2023-05-17 09:30:19 +00:00
return ''.join([char for char in string if char.isupper()])
2022-10-20 21:22:14 +00:00
if __name__ == "__main__":
main()