lundi 7 décembre 2020

I want special results in Python for random generator

I worked this code, but I want it not to show me, for example, the numbers at the beginning. I just want any letter that appears at the beginning, and also if I add these movements (- -.) I want them to appear but not at the beginning and also do not repeat how this code is possible in Python .

  import random
allchars = 'asdfghjklzxcvbnmqwertyuiop1234567890'
amount = input('How many results do you want? : ')
amount = int(amount)

length2 = input('How long do you want? : ')
length2 = int(length2)
print("\n")

for Users in range(amount):
    Users = ''

    for item in range(length2):
        Users = ''
    for item in range(length2):
        Users += random.choice(allchars)

    print(Users)



Aucun commentaire:

Enregistrer un commentaire