Change 12 on the second line to 14 and check the result.
train = {11, 12}
test = {12, 13}
print(sorted(train & test)) Line notes
- These ticket numbers belong to the training set.
- Store the ticket numbers reserved for testing.
- Print the ticket numbers that appear in both sets.