double tuple trouble (in Python)
Oh, these pesky yet incredibly useful little tuple.s My problem is a list of tuples where I need to access each one with my input. Then I need my input to match (or not) with its' pair in a tuple for my output. But when I use this 'for' statement to unpack the tuple, it reassigns my input. I've tried other methods (like, 'if') but they require me to define one tuple variable type int. But I'm not sure how to do that w/o referencing my input. The OUTPUT below is the result regardless what string is input. Any assistance would be of great help w/this days- old head-scratcher... bowling_team1 = [ ('Rue', 87), ('Tara', 95), ('Joey', 102), ('Amanda', 73), ('Bobby', 88) ] name = input() for (name,score) in bowling_team1: print(name, 'has', score, 'points') OUTPUT Rue has 87 points Tara has 95 points Joey has 102 points Amanda has 73 points Bobby has 88 points