title: Getting TypeError: not all arguments converted during string formatting
body: <p>I'm new to Python and I am solving an exercise and I got this error:
  TypeError: not all arguments converted during string formatting
  I tried reading some explanations but didn't get where I am wrong in my code</p>
  
  <pre><code>def reverse(num):
      r=0
      while(num!=0):
          r=(r*10)+(num%10)
          num //= 10
      return r
  
  num=input("Enter a number: ")
  n=reverse(num)
  numOdd=[]
  numEven=[]
  c=1
  while(n!=0):
      if (c%2==0):
          numEven.append(n%10)
      else:
          numOdd.append(n%10)
      n//= 10
      c += 1
  sortedEven=True
  sortedOdd=True
  for i in range(len(numOdd)-1):
      if(numOdd[i]&gt;numOdd[i+1]):
          sortedOdd=False
  for i in range(len(numEven)-1):
      if(numEven[i]&lt;numEven[i+1]):
          sortedEven=False
  
  if(sortedOdd==True and sortedEven==True):
      print ("True")
  else:
      print ("False")
  </code></pre>