Advertisement
Blessing988

Untitled

Mar 29th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import collections
  2.  
  3. GymExercise = collections.namedtuple("GymExercise", ["name", "weight", "reps"])
  4.  
  5. squat = GymExercise("squat", 265, 3)
  6.  
  7. bench = GymExercise("benchpress", 185, 5)
  8.  
  9. deadlift = GymExercise(weight = 225, reps = 6, name = "deadlift")
  10.  
  11. press = GymExercise("press", 120, 8)
  12.  
  13. #Testing
  14. print(squat[0])
  15. print(press.weight)
  16. print(bench.reps)
  17. print(deadlift[2])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement