x = 42.44444 print("all {2:.3f} good {0} eat {1}".format("dogs","shoes",x))
ValueError: Unknown format code 'f' for object of type 'str
| 1 | initial version |
x = 42.44444 print("all {2:.3f} good {0} eat {1}".format("dogs","shoes",x))
ValueError: Unknown format code 'f' for object of type 'str
x = 42.44444 print("all {2:.3f} good {0} eat {1}".format("dogs","shoes",x))
ValueError: Unknown format code 'f' for object of type x = 42.44444
print("all {2:.3f} good {0} eat {1}".format("dogs","shoes",x))
x = 42.44444
42.44444
print("all {2:.3f} good {0} eat {1}".format("dogs","shoes",x)) ValueError: Unknown format code 'f' for object of type 'str
This is Sage in Linux Mint
x = 42.44444
print("all {2:.3f} good {0} eat {1}".format("dogs","shoes",x))
ValueError: Unknown format code 'f' for object of type 'strThis is Sage in Linux Mint
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.