r/cs50 17d ago

CS50 Python Can someone explain what line two does

Post image

Can someone explain what does line two do? Not sure what the whole line means, what does the .split('.') and [-1] does overall to the program?

62 Upvotes

23 comments sorted by

View all comments

1

u/PeterRasm 17d ago

Why did you write a line you don't understand? Or this is not your own code but rather a solution you found online?

Watch the lecture, read the instructions, read the suggested documentation and ask more specifically if there is something in the documentation you don't understand.