Write a Python program to sort a list of tuples by the second item in each tuple.
[(3, 4), (5, 6), (1, 2)]
def sort_list(tuples):
    return sorted(tuples, key = lambda x: x[1])
 
tuples = [(3, 4), (5, 6), (1, 2)]
 
print(sort_list(tuples))