In your python file, create the following variables: Create a list named animals with 7 different animals
Fantastic news! We've Found the answer you've been seeking!
Question:
- In your python file, create the following variables:
- Create a list named "animals" with 7 different animals aselements
- Use a built-in list method to sort the list "animals" inascending alphabetical order
- Use append() to add one more animal to the list "animals"
- Create a tuple named "vegetables" with 4 different vegetablesas elements
- Create a dictionary named "birthdays" with 5 different key,value pairs. Each key should be a name and each associated valueshould be their birthday.
- Write an If Statement to check if the name "John" is a key inyour "birthdays" dictionaries. If True, print "Yes, I know John'sbirthday". If False, print "I do not know John's birthday."
Posted Date: