Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def first_letter_of_last_string(string): #declares a function that accepts an argument
- b = string[-1][0] #assigns a variable that displays the first letter of the last element in a list
- print(b) #outputs the variable b
- first_letter_of_last_string(["zebra"]) #calls the "first_letter_of_the_last_string function "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement