Sep-11-2017, 09:03 PM
Quote:import random beach = ['Civic', 'Middle', '2 Chair'] lifeguard = ['Rodriguez', 'Mills', 'L Fitzgerald'] days_off = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] def shuffle(days_off): #randomly picks one beach out from array beach random.shuffle(days_off) win = days_off[1] print (" %s" % win)
I've reposted your exact code, doing nothing but removing some things that don't matter.
If you define a function, and then define a function with the same name, then the original function no longer exists. So don't do that if you want to use all three of those functions. The proof is in the spam-colored pudding:
>>> def echo(a): ... print("A: {}".format(a)) ... >>> def echo(b): ... print("B: {}".format(b)) ... >>> def echo(c): ... print("C: {}".format(c)) ... >>> a = "spam" >>> echo(a) C: spam