# Membuat list 
my_list = [1, 3, 6, 10] 

a = (x**2 for x in my_list) 

# Output: 1 
print(next(a)) 

# Output: 9 
print(next(a)) 

# Output: 36 
print(next(a)) 

# Output: 100 
print(next(a)) 

# Output: StopIteration 
next(a) 