Last active
June 14, 2022 16:58
-
-
Save tanrax/805f7c71e0356a0a0215b765aecfb1fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def long_text(text: str, repeat: int) -> str: | |
if repeat > 0: | |
return "".join( | |
map( | |
lambda letter: letter * repeat | |
if letter in "aeiou" | |
else letter, | |
text, | |
) | |
) | |
return text | |
print(long_text("lol", 10)) | |
# looooooooool | |
print(long_text("hello world", 3)) | |
# heeellooo wooorld |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment