title: Execute Pop, Discard and Remove commands on Sets
body: <p>If someone can help to understand the following eval logic and how the particular method is applied in this scenario.</p>
  
  <pre><code>n = int(input())
  s = set(map(int, input().split()))
  
  for i in range(int(input())):
      eval('s.{0}({1})'.format(*input().split()+['']))
  
  print(sum(s))
  </code></pre>
  
  <p>The above code works absolutely fine and I'm trying to understand how the function works in details.</p>
  
  <p><a href="https://www.hackerrank.com/challenges/py-set-discard-remove-pop/problem" rel="nofollow noreferrer">Here</a> is the reference to the problem.</p>
  
  <p><a href="https://i.stack.imgur.com/zD7bM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zD7bM.png" alt="Picture 1"></a></p>
  
  <p><a href="https://i.stack.imgur.com/PPefQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PPefQ.png" alt="Picture 2"></a></p>