R_Milligan3

Numbers

Oct 5th, 2021
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/usr/bin/python3.9
  2. ListA= '/home/user/Desktop/Numbers.txt'
  3. print('Enter your number:')
  4. x = int(input())
  5.  
  6. if x in int(ListA):
  7. print('Duplicate, this Number already in List')
  8. else:
  9. with open('/home/user/Desktop/Numbers.txt','a')as f:
  10. f.write('\n')
  11. f.write(x)
  12. f.close()
  13.  
Advertisement
Add Comment
Please, Sign In to add comment