Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

Take your pick between either of these:

random.randrange(1, N)
random.randint(1, N-1)

https://docs.python.org/3/library/random.html#functions-for-integers

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40388>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to