22 Useful Snippets to Code like a Pro in Python | by Haider Imtiaz | May, 2021 | Python in Plain English

PHOTO EMBED

Fri Jun 18 2021 00:42:54 GMT+0000 (UTC)

Saved by @admariner

def get_vowels(String):
    return [each for each in String if each in "aeiou"]
get_vowels("animal") # [a, i, a]
get_vowels("sky") # []
get_vowels("football") # [o, o, a]
content_copyCOPY

https://python.plainenglish.io/22-useful-snippets-to-code-like-a-pro-in-python-1d0dcaacac69