Question: Coding Exercise - Week 6 Read in the file and find all occurrences of numbers using regular expressions. Digits that are in sequence and are

 Coding Exercise - Week 6 Read in the file and find

Coding Exercise - Week 6 Read in the file and find all occurrences of numbers using regular expressions. Digits that are in sequence and are part of an single numeric value should stay toge ther. In other words, "1,423.6" should return as a single numeric value of 1,423.6 and NOT 3 different num bers [1,432,6] See the output below for the solution. Brainteaser: The 4 is embedded in an acronym. It is from py4e. Can you eliminate i t from the results? In [1]: \# 1. Import RegEx \#2. Open file \#3. Read file into one big string \#3.5 Close the file \#4. Search for all valid numbers \#5. Print how many you found (include duplicates) \#6. Build Dictionary of Unique numbers found \#7. Print each unique number you found it

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!