Intenger meaning and using

Hello, I dont understand the intenger function, how is it supposed to work and what is the readoning behind it

Can you provide come context? Can you talk about what parts of your research thus far confuse you?

Hello Jeremy, I’m still getting started with python. I’ll give an example:

    hours, minutes = time.split(":")
    if "PM" in minutes:
        hours = int(hours) + 12
    if "AM" in minutes and hours == "12":
        hours = "00"
    return f"{hours}:{minutes[:2]}"
time_conversor("01:23 PM")

Why would I use an intenger in this case?

Cool, what have you researched so far?

The official description is here:

There is also this more approachable description:

I put “python int function” into Google and got these two results (and a huge number of others!)

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.