Steven D. Majewski <sdm7g at virginia.edu> wrote: >>>> def Number( *args ): > ... t = 0 > ... for x in args: > ... t = t * 1000L > ... assert 0 <= x < 1000, 'Out of range' > ... t = t + x > ... return t > ... >>>> Number( 1,000,000 ) > 1000000 >>>> Number( 1,234,567) > 1234567 >>>> Number( 1,200,300,400,500 ) > 1200300400500L >>>> Number( 1,200,300,400,500.25 ) > 1200300400500.25 > Of course, you can also have confusing things like: >>>> Number( 1,2,3 ) > 1002003 Be careful with this--octal notation (numbers beginning with 0) will break it.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4