My Python Quiz

The ultimate place to learn Python!

Question #29: What sequence of numbers is printed?

values = [1, 2, 1, 3]
nums = set(values)

def checkit(num):
    if num in nums:
        return True
    else:
        return False

for i in  filter(checkit, values):
    print i