Advertisement
Azelphur

Untitled

Apr 19th, 2012
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. def fmtnumber(num):
  2. num = "%.8f" % (num)
  3. num = num.rstrip('0')
  4. if num[-1] == '.':
  5. num = num[:-1]
  6. return num
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement