Jan-13-2019, 01:27 AM
>>> f'{id:3s} : {location:19s} : {max_temp:3d} / {min_temp:3d} / {precipitation:5:2f}'.format(
id=id, location=location, max_temp=max_temp,
min_temp=min_temp, precipitation=precipitation
)
Traceback (most recent call last):
File "<pyshell#77>", line 1, in <module>
f'{id:3s} : {location:19s} : {max_temp:3d} / {min_temp:3d} / {precipitation:5:2f}'.format(
ValueError: Invalid format specifier
--Why am I getting this error? Please help. Thanks. All variables are assigned and match
id=id, location=location, max_temp=max_temp,
min_temp=min_temp, precipitation=precipitation
)
Traceback (most recent call last):
File "<pyshell#77>", line 1, in <module>
f'{id:3s} : {location:19s} : {max_temp:3d} / {min_temp:3d} / {precipitation:5:2f}'.format(
ValueError: Invalid format specifier
--Why am I getting this error? Please help. Thanks. All variables are assigned and match