Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # table_flip.py >>> no gambling, lol
- table = [ ('Person' , 'Won' , 'Lost' ),
- ('Alex' , 12 , 24 ),
- ('Brian' , 6 , 5 ),
- ('Cathy' , 17 , 9 ),
- ('Donna' , 3 , 11 )
- ]
- table_flip = zip(*table)
- for z in table_flip: print z
- '''
- You get:
- [ ('Person', 'Alex', 'Brian', 'Cathy', 'Donna' )
- ('Won', 12, 6, 17, 3 )
- ('Lost', 24, 5, 9, 11 )
- ]
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement