May-24-2019, 05:24 PM
You are getting a list out of random.sample, not an integer. Therefore it's not in the list of integers you are checking against, and you get a list of lists rather than a list of integers. Put [0] at the end of line 15 to get the integer out.
Is there some reason you are not just making a list that excludes the outcasts and taking a sample from that?
Is there some reason you are not just making a list that excludes the outcasts and taking a sample from that?
valid = [x for x in whole_list if x not in outcast_list] selection_list = random.sample(valid, 5)
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures