I have like 15 if statements in python:
if d == 1:
do something
elif d == 2:
do something
this for about 15 if statements
is there a better way to do this? Or is it the best way? I am beginning to learn that redundant code is bad, but I can't think of another way to do this.
Thanks!