When I run my code in Sublime, everything works seemingly perfectly. Titles, authors, and dates all store and print the proper information. However, whenever I run the code in Codeacademy’s executor, I get this error on task 6:
I don’t understand what the error message means to my code, and any help would be appreciated.
Here is all of my code in Sublime:
highlighted_poems = "Afterimages:Audre Lorde:1997, The Shadow:William Carlos Williams:1915, Ecstasy:Gabriela Mistral:1925, Georgia Dusk:Jean Toomer:1923, Parting Before Daybreak:An Qi:2014, The Untold Want:Walt Whitman:1871, Mr. Grumpledump’s Song:Shel Silverstein:2004, Angel Sound Mexico City:Carmen Boullosa:2013, In Love:Kamala Suraiyya:1965, Dream Variations:Langston Hughes:1994, Dreamwood:Adrienne Rich:1987"
# print(highlighted_poems)
highlighted_poems_list = highlighted_poems.split(’,’)
# print(highlighted_poems_list)
highlighted_poems_stripped = []
for poem in highlighted_poems_list :
** highlighted_poems_stripped.append(poem.strip())**
# print(highlighted_poems_stripped)
highlighted_poems_details = []
for publishment in highlighted_poems_stripped :
** highlighted_poems_details.append(publishment.split(’:’))**
print(highlighted_poems_details)
titles = []
poets = []
dates = []
for list in highlighted_poems_details :
** titles.append(list[0])**
** poets.append(list[1])**
** dates.append(list[2])**
print()
print(titles)
print(poets)
print(dates)