Mili-NT

pyGetArticle

Dec 24th, 2021 (edited)
456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. def get_article(string):
  2.     only_chars = [char.lower() for char in string if char.isalpha()]
  3.     return "an" if only_chars[0] in ['a', 'e', 'i', 'o', 'u'] else "a"
Add Comment
Please, Sign In to add comment