Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Joining results
#6
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
Reply


Messages In This Thread
Joining results - by acmichelman - Sep-04-2017, 10:34 PM
RE: Joining results - by metulburr - Sep-04-2017, 10:38 PM
RE: Joining results - by acmichelman - Sep-04-2017, 10:42 PM
RE: Joining results - by ichabod801 - Sep-04-2017, 10:44 PM
RE: Joining results - by acmichelman - Sep-04-2017, 10:45 PM
RE: Joining results - by nilamo - Sep-11-2017, 09:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Joining two jupyter notebooks and getting an error! Led_Zeppelin 1 1,172 Oct-20-2022, 04:28 PM
Last Post: deanhystad
  What is the value after JOINING an empty list? JaneTan 2 5,291 Jan-04-2021, 06:25 PM
Last Post: deanhystad
  Search Results Web results Printing the number of days in a given month and year afefDXCTN 1 2,268 Aug-21-2020, 12:20 PM
Last Post: DeaD_EyE
  How to append one function1 results to function2 results SriRajesh 5 3,224 Jan-02-2020, 12:11 PM
Last Post: Killertjuh
  Python - joining xmls together invalid token error jan86 0 2,230 Apr-26-2019, 08:52 AM
Last Post: jan86
  Joining two tables together tryingtolearnpython 0 2,250 Jul-22-2018, 11:29 AM
Last Post: tryingtolearnpython
  Joining a Daemon Thread QueenSvetlana 3 3,629 Nov-21-2017, 11:39 PM
Last Post: Windspar
  joining a variable number of lists in a comprehension Skaperen 2 2,840 Oct-14-2017, 08:19 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020