Skip to content

Instantly share code, notes, and snippets.

@abhiomkar
Created January 30, 2010 13:15
Show Gist options
  • Save abhiomkar/290546 to your computer and use it in GitHub Desktop.
Save abhiomkar/290546 to your computer and use it in GitHub Desktop.
Use'less' Python Snippets
print "hello world!"
# 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