Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

sage thinks a float is a string

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

sage thinks a float is a string

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

'str

sage thinks a float is a string

x = 42.44444 print("all {2:.3f} good {0} eat {1}".format("dogs","shoes",x))

{1}".format("dogs","shoes",x))
ValueError: Unknown format code 'f' for object of type 'str
'str

sage thinks a float is a string

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

sage thinks a float is a string

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

This is Sage in Linux Mint