Advertisement
OsahonE

Wk4_2

Mar 31st, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. def first_letter_of_last_string(list):
  2.     return list[-1][0]
  3.     '''This function returns the first letter of
  4.     the last string of a list'''
  5.    
  6. print(first_letter_of_last_string(["food", "music", "book", "game", "sleep"]))
  7. print(first_letter_of_last_string(["food", "music", "book"]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement