You are viewing a single comment's thread. Return to all comments →
Yet, if I use the other format method...
n = input() s = set(map(int, raw_input().split())) for _ in range(int(input())): x = list(raw_input().split()) eval('s.{0}({1})'.format(*x+[''])) print sum(s)
...it's bulletproof. Poop.
Seems like cookies are disabled on this browser, please enable them to open this website
Set .discard(), .remove() & .pop()
You are viewing a single comment's thread. Return to all comments →
Yet, if I use the other format method...
...it's bulletproof. Poop.