pyschools topic 3 ex 9
<p>I have made already 3 posts today about pyschools.com exercises i hope that's not too much. Anyway, the exercise asks me to write a function to convert the time to 24 hour format. 
Here's an example: >>> time24hr('12:34am') '0034hr'</p>

<p>My function, which works fine in my IDLE: </p>

<pre><code>def time24hr(tstr):
    am_or_pm = tstr[-2:]
    first_numbers = tstr[0:2]
    last_numbers = tstr[3:5]
    if am_or_pm == "am":
        if first_numbers == '12':
            first_in_am12 = '00'
            return first_in_am12 + last_numbers + am_or_pm      
        else:
            return first_numbers + last_numbers + am_or_pm
    if am_or_pm == "pm":
        if first_numbers == '12':
            return first_numbers + last_numbers + am_or_pm
        elif int(first_numbers) &gt; 9:
            ok = repr(int(first_numbers) + 12)
            return ok + last_numbers + am_or_pm
        elif int(first_numbers) &lt;= 9:
            ok = repr(int(tstr[1]) + 12)
            return ok + last_numbers + am_or_pm
</code></pre>

<p>However, in the pyschools website, when i run the code, it gives me the following error : 
ValueError: invalid literal for int() with base 10: '1:'
What does this mean ? </p>
