title: Not enough values to unpack in Python
body: <p>I'm trying to allow users to manipulate a list in Python. </p>
  
  <pre><code>number_of_commands = int(input())
  x = 0
  my_list = []
  while x &lt;= number_of_commands:
      command, i, e = input().split(' ')
      command = str(command)
      i = int(i)
      e = int(e)
      x = x + 1
  
      if command == 'insert':
          my_list.insert(i, e)
      elif command == 'print':
          print(my_list)
      elif command == 'remove':
          my_list.remove(e)
      elif command == 'append':
          my_list.append(e)
      elif command == 'sort':
          my_list.sort()
      elif command == 'pop':
          my_list.pop()
      elif command == 'reverse':
          my_list.reverse()
      else:
          print("goodbye")
  </code></pre>
  
  <p>When users enter a command which requires two integers (such as <code>insert</code>), the program works, but when users enter something like <code>print</code> I get the error "not enough values to unpack". It only works if you input it as print 0 0. How could I allow users to enter commands with integers and without integers? </p>