title: 24-Hour Time Conversion to 12-Hour Clock (ProblemSetQuestion) on Python
body: <p>I am a beginner programmer in Python and I have no idea how to proceed with the following question. There are a <strong>ton</strong> of similar questions out there, however there are none having to do with Python code.</p>
  <p>I have tried to compare the strings but I am uncertain how to make the comparison. I'm pretty sure I need to take the first two numbers (hours) and divide by 12 if it is greater than 12 ... but that presents problems.</p>
  <p><strong>Question:</strong></p>
  <blockquote>
  <p>Time Conversion (24hrs to 12hr)</p>
  <p>Write a function that will allow the
  user to convert the 24 hour time format to the 12 hour format (with
  'am','pm' attached). Example: from '1400' to '2:00pm'. All strings
  passed in as a parameter will have the length of 4 and will only
  contain numbers.</p>
  </blockquote>
  <p><strong>Examples (tests/calls):</strong></p>
  <pre><code>&gt;&gt;&gt; convertTime('0000') 
  '12:00am' 
  &gt;&gt;&gt; convertTime('1337') 
  '1:37pm' 
  &gt;&gt;&gt; convertTime('0429') 
  '4:29am' 
  &gt;&gt;&gt; convertTime('2359') 
  '11:59pm' 
  &gt;&gt;&gt; convertTime('1111') 
  '11:11am'
  </code></pre>
  <p>Any input or different methods would be awesome!</p>