Python Forum
RNG; One variable must not be equal to another
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RNG; One variable must not be equal to another
#10
It's simpler with random, since random comes with Python.

import random
balls = '-'.join(map(str, random.sample(range(1, 43), 6)))
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: RNG; One variable must not be equal to another - by ichabod801 - Oct-10-2018, 01:39 AM

Forum Jump:

User Panel Messages

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