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

16 lines
273 B
Python
Executable File

def main():
print(shorten("Universidade de Aveiro"))
print(shorten("United Nations Organization"))
def shorten(string):
abv = ''
for char in string:
if char.isupper():
abv += char
return abv
if __name__ == "__main__":
main()