Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
List Overlap Trouble
#2
You need to assign the return value of a function in the module scope if you want to use it there:

third_list = RAND(start, finish, num)
print(third_list)
It looks like your two rand functions are pretty much the same, except for the confusion about how names work (names created in the function are only available in the function). So you could just do this:

third_list = RAND(start, finish, num)
fourth_list = RAND(start, finish, num)
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
List Overlap Trouble - by erfanakbari1 - Mar-18-2019, 12:47 PM
RE: List Overlap Trouble - by ichabod801 - Mar-18-2019, 02:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  List Overlap Josh_Python890 4 2,637 Jun-12-2019, 03:23 PM
Last Post: kotter

Forum Jump:

User Panel Messages

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