I have the following code
n = int(input())
s = set(map(int, input().split()))
N= int(input())
for i in range(1,N+1):
ops=input()
li=ops.split(' ')
if li[0]=='pop':
s.pop()
elif li[0]=='discard':
s.discard(int(li[1])
elif li[0]=='remove':
if (li[1]) in s:
s.remove((li[1])
print(sum(s))
here I tried comparing the string I have in the li[0] with 'remove' but it throws an syntax error:
$python3 main.py
File "main.py", line 14
elif li[0]=='remove':
^
SyntaxError: invalid syntax
I am unable to find out where am I going wrong. Can you figure it out?