0
Python. Can someone please explain what is obj from list.count(obj)?
4 Respostas
+ 2
It's a variable. It can be anything. It counts how often the value that is stored in 'obj' appears in 'list'
0
Anna
Can you give me an example?
0
l = [1, 2, 3, 4, 1, 2, 3, 2, 1, 2]
var = 2
print(l.count(var))
0
Thx