Created
January 30, 2010 13:15
-
-
Save abhiomkar/290546 to your computer and use it in GitHub Desktop.
Use'less' Python Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "hello world!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Print Names Right Justified, taking maximum name length as padding length | |
mynames = ['Abhinay', 'Rakesh', 'Santosh', 'Rama Krishna', 'Bhaskar', 'Venu'] | |
print '\n'.join([x.rjust(max(map(len,mynames))) for x in mynames]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment