Skip to content

Instantly share code, notes, and snippets.

@tanrax
Last active June 14, 2022 16:58
Show Gist options
  • Save tanrax/805f7c71e0356a0a0215b765aecfb1fd to your computer and use it in GitHub Desktop.
Save tanrax/805f7c71e0356a0a0215b765aecfb1fd to your computer and use it in GitHub Desktop.
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