Lists are ordered, mutable sequences; tuples are ordered, immutable sequences; sets are unordered collections of unique elements. Each fits a different testing need.
A list ([1, 2, 3]) supports append/remove and duplicates — use it for ordered, changing data like a sequence of test steps. A tuple ((200, 'OK')) is immutable and hashable — use it for fixed records (a status code + message) or as dict keys. A set ({1, 2, 3}) stores unique items with O(1) membership and supports union/intersection/difference — great for comparing expected vs actual id sets. Tuples are slightly faster and safer for constants; sets are unordered so you cannot index them.
Comparing API results to expected: missing = set(expected_ids) - set(actual_ids) instantly reveals which ids the API failed to return, using set difference — far cleaner than nested loops.
Why can a tuple be used as a dictionary key but a list cannot?