*Please use PYTHON to write a code for this problem* Your task is to find all social security numbers listed within a particular file. You are given a file (info.txt) which contains text including some social security numbers. You have to read the file and find all social security numbers within it and output those numbers to a new file (ssn.txt). All social security numbers are of the form XXX-XX-XXXX where X is a digit between 0 and 9 inclusive. The outputted social security numbers should be on separate lines. Note: You may assume Info.txt is in the same folder as your python py file. You should create the required output file in the same folder. Keep in mind, to test this program you will have to create your own Info.txt and save it in the same folder as your python py file
*Please use PYTHON to write a code for this problem*
Your task is to find all social security numbers listed within a particular file. You are given a file (info.txt) which contains text including some social security numbers. You have to read the file and find all social security numbers within it and output those numbers to a new file (ssn.txt).
All social security numbers are of the form XXX-XX-XXXX where X is a digit between 0 and 9 inclusive. The outputted social security numbers should be on separate lines.
Note: You may assume Info.txt is in the same folder as your python py file. You should create the required output file in the same folder.
Keep in mind, to test this program you will have to create your own Info.txt and save it in the same folder as your python py file.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images