r/PythonLearning • u/Reh4n07_ • Jun 24 '26
Help Request Why?
so first I take the input from the user of 3 movies and convert that string into list so this has to be 3 items in the list.
but when I print the length of the list it says 0 items why
68
Upvotes
1
u/JustMedansh Jun 24 '26
There's a few problems with your code.
You shouldn't use the movies variable. In that case, you are basically adding three things as one. Instead you should append each individually (lst.append(mov1))
Before you do "print(len(lst))", you use "list.pop(0)". That removes the only thing in lst. There's nothing in lst, so it prints 0. You can see that in the output window just before 0, too, that the list has nothing in it.