im making a program wich sorts out valid and invalid social security numbers.
The program is supposed to be able to sort numbers from a textfile on my computer. However im only able to input all the numbers at once (i think). i wont the program to check the numbers one by one.
this is how it looks right now
def fileinput():
try:
textfile = open("numberlist.txt","r")
socialsecuritynumber = textfile.read()
numberprogram(socialsecuritynumber)
except IOError:
print("there's no such file!\n")
anyone know how im supposed to do this? the textfile just contains numbers
- 1993-06-11 5570
- 930611-5570
- 930611 5570
- 93 05115570
- 1993 05 11 55 70
- 1993 05 11 5570
this is numbers from my textfile