Sign up for Free !!
World's first open source developer community with
Ticketing System
Please tell a way......
Use len(list) function.
In [1]: l = (1, 2, 3) In [2]: len(l) Out[2]: 3
Update:
In [14]: l = (1, 3, 4, 5, 4, 3, 4) In [15]: {x: l.count(x) for x in set(l)} Out[15]: {1: 1, 3: 2, 4: 3, 5: 1}
It is not about length of list , I want to know how many times a element is repeated in the list...but tq for your response
check my update
yes it is correct .Thank you for your answer
Please Login/Register to write your answer !!!
Use len(list) function.
Update: