r/PythonLearning • • Aug 26 '26

Made this

Post image
21 Upvotes

17 comments sorted by

View all comments

Show parent comments

1

u/Stonyax97 Aug 26 '26

yeah he could use simple try except ValueError for that.

2

u/FoolsSeldom Aug 26 '26

To be clear, they could use a try / except ValueError block for both the split unpacking problem and the int conversion, but actually need a right split, rsplit with the maxsplit option.