0
empty list
How many items are on this list? [2,] 3 1 2
4 Respostas
+ 1
right now python wants to use the comma to separate list items, soit is not an item itself. you can make it one by changing your list to this:
[2, ',']
In that example the 2 is an integer and the comma is a string character. You can dothe same in the following example except the 2 will now be treated as a string just like the comma.
['2', ',']
either way you choose you must separate all items with a comma.
0
1
Just use the len() function
0
and comma??
0
print(len([2,])) outputs 1