Skip to content

Instantly share code, notes, and snippets.

@c0ldlimit
Created May 6, 2015 19:37
Embed
What would you like to do?
#python formatting floats in python without superfluous zeros
#http://stackoverflow.com/questions/2440692/formatting-floats-in-python-without-superfluous-zeros
#https://docs.python.org/2/library/string.html#format-specification-mini-language
'{0:g}'.format(3.140)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment