While and If messing up my program?

ajikoe at gmail.com ajikoe at gmail.com
Wed Oct 5 03:10:12 EDT 2005


hi,

to get howmany element list appear you can code:
    ttllst=[4,3,45,3]
    for x in ttllst:
        print x, ttllst.count(x)
    pass

to get non duplicate element list you can code:
    ttllst=[4,3,45,3] 
    print list(set(ttllst))

Cheers,
pujo




More information about the Python-list mailing list