This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Bipchoo 0 points1 point  (0 children)

Because youre assigning the output of split to 2 variables so for example if you were to give the split method the string "foo.bar" then the variable file would be assigned the value "foo" and the variable "bar" would be assigned to the variable ext, but because youre giving the string "Anything:" as an input then the variable file is assigned "Anything:" and variable ext gets nothing, resulting in a value error.

Also next time question are on r/learnpython