Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- bob = ('Bob', 30, 'male')
- print 'Representation:', bob
- jane = ('Jane', 29, 'female')
- print '\nField by index:', jane[0]
- print '\nFields by index:'
- for p in [bob, jane]:
- print '%s is a %d year old %s' % p
Advertisement
Add Comment
Please, Sign In to add comment