Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3.9
- ListA= '/home/user/Desktop/Numbers.txt'
- print('Enter your number:')
- x = int(input())
- if x in int(ListA):
- print('Duplicate, this Number already in List')
- else:
- with open('/home/user/Desktop/Numbers.txt','a')as f:
- f.write('\n')
- f.write(x)
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment