F&A Diskussionen
len, para que sirve?
0 Stimmen
1 AntwortWhy output 3 but no 2?
4 Stimmen
4 AntwortenWhy isn't working properly???
3 Stimmen
1 AntwortHello guys right now I am kinda of new in python
my question is related to the function call len()
len() its print out the character but here it's the confusing part, I am working with a list let me explain an example
players
['lee', 'bob', 'moe', 'joe']
len(players)
4
why it's giving me 4 item in the list I thought len it counts the characters and if I do this it give me the correct somewhat answer what I am seeking,
len(players [-1])
3
0 Stimmen
8 Antworten