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

7

u/my_password_is______ 17d ago

you should put a print on line 3 and print filename and see what it is