Question: be quick PLS python Names The file names.txt contains an unspecified number of lines, each line contains an unspecified number of names, Write a program

be quick PLS python
Names The file names.txt contains an unspecified number of lines, each line contains an unspecified number of names, Write a program that prints the line number and the line content of all lines that contain both the names Ernesto an considered. For example, given the file Edgar Ernesto Giovanni Adolto Pietro Pio gOVANNI MCK keITH CHARLIE CONNIE CINESTO John Paul George Ringo bRiAn ERNESTO MIKE aL gIOVANNI BRUCe The output should be: Line 3: giOVANNI MicK KEITH CHARLIE ZONNIE ERNESTO Line 5: DRiAn eRNESTO MIKE AL GIOVANNI BRuce ANSWER The file names.txt is available, although not visible DOCS: Python official documentation., Cheatsheet. Answer: (penalty regime: 0%) # compile to see contents of the file print (open ("names.txt").read())
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
