Almost got it! This command helped me a lot! I am wondering I didnt find it on the internet.
Btw. the output is like this:
What is wrong?
import random number=random.sample(range(1500),1) letters=random.sample(['a','b','c','d','e','f','g','h'],4) for i in range(100): number=random.sample(range(1500),1) letters=random.sample(['a','b','c','d','e','f','g','h'],4) print(number,letters)My program is almost done. Now the last problem. How to sort the numbers and letters? And I am not sure about my number command. I think it will still give me numbers with possible repetition.
Btw. the output is like this:
Output:([82], ['g', 'h', 'e', 'a'])
([440], ['b', 'c', 'a', 'g'])
([1157], ['f', 'h', 'g', 'c'])
([465], ['g', 'h', 'c', 'a'])
([1349], ['g', 'f', 'b', 'c'])
([635], ['b', 'e', 'a', 'h'])
([148], ['g', 'e', 'h', 'a'])
([1456], ['d', 'b', 'h', 'c'])
([204], ['e', 'h', 'a', 'b'])
([1346], ['b', 'g', 'c', 'a'])
([703], ['g', 'a', 'f', 'd'])
([924], ['b', 'h', 'd', 'g'])
([1314], ['f', 'h', 'a', 'd'])
([887], ['c', 'a', 'b', 'h'])
([484], ['f', 'c', 'b', 'a'])
([1483], ['e', 'd', 'h', 'b'])
What is wrong?