I am trying to produce an index of characters from the string. The string is in addition to an array, which is collected from f = open ('times.txt)
, in line times.txt, each line follows the same layout (DD / MM / Yay, smm)
I only want to output the last 4 characters as float, but I'm not sure how to do this. So far, I have managed to output only each string from text document to a different row in Python, i.e.
dd / mm / yyyy, smm dd / mm / yay, ss Mm dd / mm / yay, ssm etc.
The code for this is:
f = open ('times.txt') line = F.readlines () # Numbers for numbers (0 , 6) in loop to apply numbers for i = 0: print line [i] + "# # This code is under construction .def time source (): Global I If I lines in. Allen (13,17): If lines. LN (13,17) (I)>>: print lines.len (13,17) f.close ()
I only print it like this Want to:
ss.mm ssm smm etc.
character sl Do not hardcod the code, simply divide the date of time from ,
:
with open ('so.txt') f: in line f: time = Float (Line.split (',') [1]) Print time
Comments
Post a Comment