Hello everyone! So, to start with, this is my first time actually posting anything here, and I don’t really know if this is the right place to post this, but here goes. I already got through this stage, but I reaally don’t think I solved it in the most optimal of ways. I’d very much appreciate it if someone were to critique it. I came up with this solution on my own btw, no tips or anything so be gentle lol.
last_name = “”
authors = “Audre Lorde, William Carlos Williams, Gabriela Mistral, Jean Toomer, An Qi, Walt Whitman, Shel Silverstein, Carmen Boullosa, Kamala Suraiyya, Langston Hughes, Adrienne Rich, Nikki Giovanni”
author_names = authors.split(",")
for name in range(0, len(author_names)):
current_name = author_names[name]
for letter in range(-1, -len(current_name), -1):
if current_name[letter] == " ":
last_name += current_name[letter + 1:] + " "
#print( “I found a space. I should stop here.”)
last_names = last_name.split(" ")
for name in range(0, len(last_names)):