| | |
List operation problem
Thread Solved |
Yes there is it's pretty simple too
Hope that helps.
Chris
python Syntax (Toggle Plain Text)
mylist = ['blue', 'red', 'green', 'green', 'red', 'red'] for word in set(mylist): print word, "appears", mylist.count(word), "times."
Hope that helps.
Chris
Knowledge is power -- But experience is everything
![]() |
Similar Threads
- Amaena and Microsoft problem (Viruses, Spyware and other Nasties)
- Some Data Structure Problem (C++)
- BIG problem with STL List Container (C)
- Problem on array based list (C)
- Swing Problem (Java)
- Singly-Linked Lists problem (C++)
Other Threads in the Python Forum
- Previous Thread: Translate C/C++ Code to python
- Next Thread: wxTreeCtrl - Load Tree structure from file
| Thread Tools | Search this Thread |
address aliased anydbm app bash beginner bits calling casino changecolor cipher clear conversion coordinates corners count cturtle curves definedlines development dictionary digital dynamic events examples excel external feet file float format function gui handling hints homework iframe images import input java keycontrol line linux list lists loan loop matching mouse multiple number numbers output parsing path port prime programming projects py py2exe pygame pymailer python random rational raw_input recursion recursive scrolledtext searchingfile shebang signal singleton split string strings tails terminal text threading time tlapse tooltip tuple tutorial type ubuntu unicode url urllib urllib2 valueerror variable web-scrape whileloop word wxpython xlwt





