I want to change tuple type data into int type during forloop. How to read those tuple data? (Because I want to convert those data into datetime )
>>> print data
((1424794931452.0,), (1424794931645.0,), (1424794931821.0,),(1424794932014.0,), (1424794932189.0,))
I have 5 tuple data(unixtime) and this is what I want to do.
for i in data:
con = int(data[i][0])
dt = datetime.fromtimestamp(con // 1000)
s = dt.strftime('%Y-%m-%d %H:%M:%S')
print(s)
I think those tuple data is ([0][0],[1][0],[2][0],[3][0],[4][0]) right?
What is problem? I don't know python well.