Changing Text to Float

Well, you can’t make it an int because it is not an int.

What int would you expect to convert "1:23:45" into?

Perhaps you want to convert it into a time.
I’m on my cell now, and I may not remember correctly, but I think the datetime.strptime() is the function you are looking for.
You need to pass the string to convert and specify the expected format. You can Google it to find some examples.

Or you could split it into a list of strings with WH.split(":"), then convert each element of the list to int.

Our you could provide more details, and we could try to help a little more.

2 Likes