Juan Postlbauer added the comment:
Just a clarification: by "infinite potential loop" I meant a loop that
*theoretically* could last forever. Of course in practice it won't, but my
experiments show that for the conditions in the example in average the current
recipe genera
New submission from Juan Postlbauer :
Chapter 15.3.4 shows a recipe with an infinite potential loop.
An alternative would be:
''.join(sorted([choice(string.ascii_lowercase) for i in
range(1)]+[choice(string.ascii_uppercase) for i in
range(1)]+[choice(string.digits) for i in
range(3