Advertisement
kevinbocky

f_string_lower_in_for_loop.py

May 11th, 2020
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. names = ["Thierry" , "rutger" , "bert" , "nico"]
  2. print(f"{names[0].title()} , nice to see you again! ")
  3.  
  4. print(f"{names[1].title()} , it has been a long time , nice seeing you! ")
  5.  
  6. print(f"{names[2].title()}, nice seeing you, how have you been? \n")
  7.  
  8. new_names = [x.lower() for x in names]
  9. print(sorted(new_names))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement