I am using Python's string formatting method inside a definition to call some .txt files. One such example is:
def call_files(zcos1,zcos1,sig0):
a,b = np.loadtxt('/home/xi_'+str(zcos1)+'<zphot'+str(sig0)+'<'+str(zcos2)+'_.dat',unpack=True)
Here str(sig0)
is given the call where sig0 == 0.050
. However when I do so, instead of taking 0.050
, it is rounded off to 0.05
!
How do I make str(sig0)
to be 0.050
instead of 0.05
?