This question is for STEP 1 Only of this exercise:
Creating and Modifying a List in Python: Zip()
The Instructions for step 1 state: Use
zip to create a new variable called
names_and_dogs_names that combines
dogs_names into a
Make sure to run the code for this step before proceeding to the next instruction!
names = ['Jenny', 'Alexus', 'Sam', 'Grace'] dogs_names = ['Elphonse', 'Dr. Doggy DDS', 'Carter', 'Ralph'] names_and_dogs_names = zip(names, dogs_names) print(list(names_and_dogs_names))
The error message: Is
names first and
names = ['Jenny', 'Alexus', 'Sam', 'Grace'] dogs_names = ['Elphonse', 'Dr. Doggy DDS', 'Carter', 'Ralph'] names_and_dogs_names = zip(names, dogs_names) list_of_names_and_dogs_names = list (names_and_dogs_names) print(list_of_names_and_dogs_names)
Please note Step 2 is:
Create a new variable named
list_of_names_and_dogs_names by calling
names_and_dogs_names . Print this new variable .
My code wouldn’t let me proceed to step 2. Can someone please explain why my solution didn’t work for Step 1? I “believe” I produced the same results expected.
Thank you for your time and consideration!