Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- c1 = (random.choice([9, 9]))
- c2 = (random.choice([1, 1]))
- c3 = (random.choice([9, 9, 9]))
- def gerar_randomico():
- return random.choice([2, 3, 4, 5, 6, 7, 8, 9])
- def gerar_randomicus():
- return random.choice([6, 7, 8, 9])
- for i in range(3):
- print ('{}{}{}{}{}{}{}{}{}{}{}'.format(c1, c2, c3, gerar_randomicus(), gerar_randomico(),gerar_randomico(), gerar_randomico(),gerar_randomico(),gerar_randomico(),gerar_randomico(), gerar_randomico()))
- import random
- c1 = (random.choice([9, 9]))
- c2 = (random.choice([1, 1]))
- c3 = (random.choice([9, 9, 9]))
- lista = []
- def gerar_randomico():
- return random.choice([2, 3, 4, 5, 6, 7, 8, 9])
- def gerar_randomicus():
- return random.choice([6, 7, 8, 9])
- for i in range(3):
- lista1 = ('{}{}{}{}{}{}{}{}{}{}{}'.format(c1, c2, c3, gerar_randomicus(), gerar_randomico(),gerar_randomico(), gerar_randomico(),gerar_randomico(),gerar_randomico(),gerar_randomico(), gerar_randomico()))
- with open('arquivo.txt','a') as arquivo:
- arquivo.write(str(lista1))
- lista_guardar = lista.append(arquivo)
- print(lista_guardar)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement