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
#11
(Oct-10-2018, 01:39 AM)ichabod801 Wrote: It's simpler with random, since random comes with Python.
That's with replacement though.
Feel like you're not getting the answers you want? Checkout the help/rules for things like what to include/not include in a post, how to use code tags, how to ask smart questions, and more.

Pro-tip - there's an inverse correlation between the number of lines of code posted and my enthusiasm for helping with a question :)
Reply
#12
(Oct-10-2018, 02:00 AM)micseydel Wrote: That's with replacement though.

Python Docs Wrote:random.sample(population, k)

Return a k length list of unique elements chosen from the population sequence or set. Used for random sampling without replacement.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#13
Oh wow, my mistake.
Feel like you're not getting the answers you want? Checkout the help/rules for things like what to include/not include in a post, how to use code tags, how to ask smart questions, and more.

Pro-tip - there's an inverse correlation between the number of lines of code posted and my enthusiasm for helping with a question :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to extract previous and current rows if their value is equal SriRajesh 5 1,658 Jun-18-2018, 08:09 PM
Last Post: volcano63
  Conditional If Statement: If value contains string then set another column equal to s Jack_Sparrow 2 2,383 Jun-15-2018, 03:33 PM
Last Post: snippsat
  linspace not dividing equal intervals sheel 0 1,151 Jan-16-2018, 04:28 PM
Last Post: sheel

Forum Jump:

User Panel Messages

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