def myFunction(x):
    print('called for: ' + str(x))
return x * x
originalList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
limit = 10
result = [C2 for C2 in ((myFunction(C), C) for C in originalList) if C2[0] <
    limit]
List Comprehensions in Python : efficient selection in a list