I am currently doing my first project off platform on Jupyter Notebook. I am working on a lists project-(Frida_Project). This project asks you to append and zip lists together. I have come across an interesting problem where my zipped lists keep DOUBLING and I am pretty clueless.
paintings = ["The Two Fridas", "My Dress Hangs Here", "Tree of Hope", "Self Portrait With Monkeys"]
dates = [1939, 1933, 1946, 1940]
"""Zip together the two lists so that each painting is paired with its date and resave it to the paintings variable. Make sure to convert the zipped object into a list using the list() function. Print the results to the terminal to check your work."""
paintings = list(zip(paintings, dates))
print(paintings)
"""After running this, the "data" list doubles each time. I've even renamed the new list painting_2, same output.
[(((((((((((((((('The Two Fridas', 1939), 1939), 1939), 1939), 1939), 1939), 1939), 1939), 1939), 1939), 1939), 1939), 1939), 1939), 1939), 1939), (((((((((((((((('My Dress Hangs Here', 1933), 1933), 1933), 1933), 1933), 1933), 1933), 1933), 1933), 1933), 1933), 1933), 1933), 1933), 1933), 1933), (((((((((((((((('Tree of Hope', 1946), 1946), 1946), 1946), 1946), 1946), 1946), 1946), 1946), 1946), 1946), 1946), 1946), 1946), 1946), 1946), (((((((((((((((('Self Portrait With Monkeys', 1940), 1940), 1940), 1940), 1940), 1940), 1940), 1940), 1940), 1940), 1940), 1940), 1940), 1940), 1940), 1940)]"""
"""My solution was this bellow, the next question asked me to append a short list to the original. I commented out the append portion to see if my while loop would clean up my list.
""""
new_list = ["The Broken Column", 1944, "The Wounded Deer", 1946, "Me and My Doll", 1937]
for i in new_list:
while len(paintings)>15:
paintings.pop()
'''if len(paintings)< 15:
paintings.append(i)'''
print(paintings)
"""The list does not double anymore but it isnt getting anf shorter.""""
Please help me, I am lost and hungry.