Jul-21-2019, 01:03 AM
Basic simplification would be to use while loops instead of for loops, use sets instead of lists, add the random numbers to the sets directly instead of assigning them to a variable and then adding/appending, and union the two sets to find the elements of both.
If you create the two sets using list comprehensions, you could do it all in one line.
If you create the two sets using list comprehensions, you could do it all in one line.
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