Hello,
I was wondering if some kind soul could explain me what exactly is happening, step-by-step or some similar kind of explanation, in the for loop in the following code:
authors = "Audre Lorde,Gabriela Mistral,Jean Toomer,An Qi,Walt Whitman,Shel Silverstein,Carmen Boullosa,Kamala Suraiyya,Langston Hughes,Adrienne Rich,Nikki Giovanni"
author_names = authors.split(',')
#print(author_names)
author_last_names = []
for name in author_names:
author_last_names.append(name.split()[-1])
print(author_last_names)
After not succeeding in completing this exercise by myself I was forced to ask for a solution, but even then I was not able to fully understand this for loop.
Thank you very much.