Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. def first_letter_of_last_string(string):   #declares a function that accepts an argument
  2.     b = string[-1][0] #assigns a variable that displays the first letter of the last element in a list
  3.     print(b) #outputs the variable b
  4. 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