I'm trying to write a program that will create a randomly generated eight-character key (in ASCII characters). So far I have been able to get the 8 different numbers, then convert them into their equivalent ASCII character:
> import random
> for i in range(0,8):
> key = random.randint(33,126)
> key = chr(key)
> print(key)
however when I run the program it prints (the output is at least always different):
> ~
> e
> E
> v
> k
> `
> (
> X
when ideally I would like it to print (with no spaces in-between):
> ~eEvk`(X
but I have tried so many methods (formatting included) to put it into a string but nothing has worked! Sorry for the lengthy question, but I hope it made sense. An answer ASAP would be really appreciated. Thank you!