Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import collections
- GymExercise = collections.namedtuple("GymExercise", ["name", "weight", "reps"])
- squat = GymExercise("squat", 265, 3)
- bench = GymExercise("benchpress", 185, 5)
- deadlift = GymExercise(weight = 225, reps = 6, name = "deadlift")
- press = GymExercise("press", 120, 8)
- #Testing
- print(squat[0])
- print(press.weight)
- print(bench.reps)
- print(deadlift[2])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement