Question: PYTHON 3 Using string method replace() and string method translate() and using regular expressions. Compare the running time of each using the experimental running time

PYTHON 3 Using string method replace() and string method translate() and using regular expressions. Compare the running time of each using the experimental running time analysis framework. PYTHON 3 Using string method replace() and string method translate() and using

Your output should look like this: Time analysis on the replace(), translate(), and regular expression methods of removing punctuation from randomly generated strings using the timing framework from Chapter 10. Average Run-Time of testRegEx(30) is 3.120041e-06 seconds. Average Run-Time of testRegEx1280) is 2.340007e-05 seconds. Average Run-Time of testRegEx(530) is 1.872003-05 seconds. Average Run-Time of test Translate30) is 1.559997e-06 seconds. Average Run-Time of test Translate[280) is 6.240058e-06 seconds. Average Run-Time of testTranslate(530) is 1.560001e-05 seconds. Average Run-Time of testReplace(30) is 4.680014e-06 seconds. Average Run-Time of testReplace(280) is 1.092002e-05 seconds. Average Run-Time of testReplace(530) is 1.872005e-05 seconds. timeit. Time() was used for greater accuracy. the translate function was the most efficient based on time run analysis. Time analysis on the replace(), translate(), and regular expression methods of removing punctuation from randomly generated Strings using timeit. Timer The average time from on 1,000,000 runs for each input, and each function, is reported. Testing szok-u}JAHCLPOAZ"qhne TZXVR7A{ELD jr]: 3!f(jvha C9f&_{&j,5%H32Dzr%nZS1um.P- hRO.z!?TEb8.%#Z?km8f11GX6[/2eL[2NCUHI*n1EC4 Js6s#V-d&mjzS:Wt-{^(J=/4ki4/%uQuald!uYe regEx = 1.4057603399999863e-05 translate : 4.357549200000221e-06 replace_9.560869499999924e-06 Testing s = _]bh}'= _@{v6IYR/Ea2!0Q(!\_A6pfE3v39jJh Au;FMp%%#U|fA>li%-OTf3|CDP-CH!$P;2Hct A%b{S, E7/V#uPebbXu{Vj-IFS]d"="luc}dRpd/-Gjn&S!YLiBwllofjsivWLHG),"dTNG08- cpSj. 1u*. GKilp6C4Ad3:(@1jt>iiTM5u1,ZOqXSgSPH[Q9JM-c5>!48Y9UV7Vx:TF>W- 21. a"h?DGCn&12G4%&jlp^Mn5 ),iFnk+!DYops"D

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!