[FP] Quick simplifications

This commit is contained in:
TiagoRG 2023-05-17 10:30:19 +01:00
parent fba71565ad
commit d24c0fcbb7
Signed by untrusted user who does not match committer: TiagoRG
GPG Key ID: DFCD48E3F420DB42
2 changed files with 2 additions and 6 deletions

View File

@ -16,7 +16,7 @@ print("Age:", age)
if age < 13:
cat = "child"
elif 13 < age < 20:
elif age < 20:
cat = "teenager"
else:
cat = "grown-up"

View File

@ -4,11 +4,7 @@ def main():
def shorten(string):
abv = ''
for char in string:
if char.isupper():
abv += char
return abv
return ''.join([char for char in string if char.isupper()])
if __name__ == "__main__":