Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #lista com valores infinitos = usar whilen
- numero = []
- while True:
- n = int(input('Digite um valor: '))
- if n not in numero:
- numero.append(n)
- else:
- print('esse numero ja está na lista')
- r = str(input('quer continuar? [S/N] '))
- if r in 'Nn':
- break
- numero.sort()
- print(f'voce digitou os valores {numero}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement