Advertisement
yragi_san

Extract First Names

Oct 8th, 2020
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. names = ["Rick Sanchez", "Morty Smith", "Summer Smith", "Jerry Smith", "Beth Smith"]
  2.  
  3. first_names = [name.split()[0].lower() for name in names]
  4. print(first_names)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement