Created
June 17, 2015 14:31
-
-
Save minorsecond/6629ae32ab6a8847a389 to your computer and use it in GitHub Desktop.
This should return True but doesn't. The dict 'warmup_weight' is constructed in such a weird way. It should appear just like 'warmup_test.'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def warmup(weights): | |
warm_perc = [.5, .6, .7, .85] | |
warmup = [] # list of warmup weights | |
weights = {'squat': 100, 'bench': 100, 'row': 100, 'ohp': 100, | |
'deadlift': 100} # dict of user's working set weights | |
warmup_weight = weights | |
# The values I want... | |
warmup_test = {'squat': [50, 60, 70, 85], 'bench': [50, 60, 70, 85], 'row': [50, 60, 70, 85], | |
'ohp': [50, 60, 70, 85], 'deadlift': [50, 60, 70, 85]} | |
for key, value in warmup_weight.items(): | |
for i in warm_perc: | |
# Create a list of warmup weights for each lift. | |
warm = value * i | |
warmup.append(warm) | |
warmup_weight['{0}'.format(key)] = warmup | |
print(warmup_weight == warmup_test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment