[code.view]

[top] / python / PyMOTW / fractions / fractions_create_strings_floats.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2009 Doug Hellmann All rights reserved.
     #
     """
     """
     #end_pymotw_header
     
     import fractions
     
     for s in [ '0.5', '1.5', '2.0' ]:
         f = fractions.Fraction(s)
         print '%s = %s' % (s, f)
     

[top] / python / PyMOTW / fractions / fractions_create_strings_floats.py

contact | logmethods.com