Skip to main content
2 events
when toggle format what by license comment
Nov 12 at 8:41 comment added Aemyl Also since Python 3.8, you can use assignment expressions to rewrite the loop: while not is_prime(prime := randint(min_value, max_value)): pass
Sep 22 at 15:22 history answered Nayuki CC BY-SA 4.0