Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy
- from random import sample
- f = open("Python_Project.txt","w+")
- count = 0
- print("Enter 20 unique numbers within the range 1-100")
- while (count<20):
- x = int(input())
- if x > 0 and x < 101:
- f.write(str(x))
- f.write(" ")
- count += 1
- else:
- print("Please Enter a number between the range")
- f.close()
- myfile = open("Python_Project.txt", "r")
- contents = myfile.read().split(',')
- myfile.close()
- print(contents)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement