https://www.codecademy.com/paths/machine-learning-ai-engineering-foundations/tracks/mlef-python-fundamentals-for-ml-ai-engineers/modules/mlef-frida-kahlo-cumulative-project/projects/frida-kahlo-retrospective-project
Not sure why I am getting this error on this code:, if I remove the last print statement, it works. It also works fine in Sublime text, just not on the platform.
File “script.py”, line 14
^
SyntaxError: unexpected EOF while parsing
This is what the code looks like:
#1
paintings = ['The Two Fridas', 'My Dress Hangs Here', 'Tree of Hope', 'Self Portrait With Monkeys']
#2
dates = [1939, 1933, 1946, 1940]
#3
merged = list(zip(paintings, dates))
print(merged)
#4
merged.append("'The Broken Column',1944")
merged.append("'The Wounded Deer', 1946")
merged.append("'Me and My Doll', 1937")
#5
print(len(merged)
Then when I try to add the rest of the code I get Syntax error:
#1
paintings = ['The Two Fridas', 'My Dress Hangs Here', 'Tree of Hope', 'Self Portrait With Monkeys']
#2
dates = [1939, 1933, 1946, 1940]
#3
merged = list(zip(paintings, dates))
print(merged)
#4
merged.append("'The Broken Column',1944")
merged.append("'The Wounded Deer', 1946")
merged.append("'Me and My Doll', 1937")
#5
print(len(merged)
#6
audio_tour_number = range(7)
print(audio_tour_number)
#7
master_list = list(zip(merged))
#8
print(master_list)
can someone explain why? I’m really not sure why it would say variable = range(x,y) would be wrong syntax. I’ve looked for it on external forums but the syntax seems okay?
File “script.py”, line 15
audio_tour_number = range(7)
^
SyntaxError: invalid syntax