title: IndexError :::list index out of range
body: <p>I'm new to python.
  I wrote a code below.
  code is running.
  But when I command &quot;pop&quot; from the outside, it gives an error.
  because only one word is written for the &quot;pop&quot;
  and so it gives &quot;IndexError: list index out of range&quot; error for number variable
  ı can how to fix this error?</p>
  <pre><code>z=int(input())
  liste=set(map(int,input().split()))
  for _ in range(0,int(input())):
         line=input().split()
         deger=line[0]
         sayi=line[1]--this line give me error for 'pop' command
         if deger=='pop':
             liste.pop()
         elif deger=='remove':
             liste.remove(int(sayi))
         elif deger=='discard':
              liste.discard(int(sayi))
         else:
             pass
  
  for xx in liste:
      print(str(xx),sep=&quot;\n&quot;)
  </code></pre>
  <p>Error:</p>
  <blockquote>
  <p>&quot;IndexError: list index out of range&quot;</p>
  </blockquote>