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
- 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."
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
