Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple List manipulation - bowled
#6
You could use tuple assignment to clean up the split:

technology, color = item.split(':')
Also, you only need to sort newcols once, after the loop, so give it the same indentation as the dict cols.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Simple List manipulation - bowled - by radioactive9 - Aug-11-2017, 01:54 AM
RE: Simple List manipulation - bowled - by ichabod801 - Aug-11-2017, 12:32 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020