I have a small problem with a function that should potentially generate a random 6-digit code. The code in itself is absolutely straightforward, using python 3 I do it like