I saw a line of code to generate random string.
''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(N))
I am not sure what type of usage is this and I cannot find it in python doc.
I try
random.choice(string.ascii_uppercase + string.digits) for _ in range(N)
but it says there's a syntax error