Tue Mar 12 2024
Note / A Simple Number Guessing Game (Python)
Note / A Simple Number Guessing Game (Python)
For a problem like "draw 4 non-repeating digits", the usual approach is to pick an index and then delete it. But Python's random library clearly has a better answer: random.sample, then stitch the digits together with str.join.
import random
