import csv x r".\Pioneers.txt" p r".\FourMore Pione ers.txt" f-open (x) names- morePioneersFile=open (p) for lines in csv.reader (f) names.append (lines [0]) f.close f-open (x,"a") for newLine in csv.reader (morePioneersFile) if newLine [0] not in names: names.append (newLine [0]) else: continue newLine=",".join (newLine) f.write (f'\n{newLine } ') f.close morePioneersFile.close ()

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter5: Working With Excel Tables, Pivottables, And Pivotcharts
Section: Chapter Questions
Problem 1.9CP
icon
Related questions
Question

Python 3.7.4:

I just need help with the indentation. I don't need you to look at the code itself so don't worry about that being right or wrong, I just need to double-check that I intented everything properly.  Thank you for your help!

import csv
x=r".\Pioneers.txt”
p=r".\FourMorePioneers.txt"
f=open(x)
names=[]
morePioneersFile=open(p)
for lines in csv.reader(f):
names.append(lines[0])
f.close()
f=open(x,"a")
for newLine in csv.reader(morePioneersFile):
if newLine[0]not in names:
names.append(newLine[0])
else:
continue
newLine=",".join(newLine)
f.write(f'\n{newLine}')
f.close()
morePioneersFile.close()

import csv
x r".\Pioneers.txt"
p r".\FourMore Pione ers.txt"
f-open (x)
names-
morePioneersFile=open (p)
for lines in csv.reader (f)
names.append (lines [0])
f.close
f-open (x,"a")
for newLine in csv.reader (morePioneersFile)
if newLine [0] not
in names:
names.append (newLine [0])
else:
continue
newLine=",".join (newLine)
f.write (f'\n{newLine } ')
f.close
morePioneersFile.close ()
Transcribed Image Text:import csv x r".\Pioneers.txt" p r".\FourMore Pione ers.txt" f-open (x) names- morePioneersFile=open (p) for lines in csv.reader (f) names.append (lines [0]) f.close f-open (x,"a") for newLine in csv.reader (morePioneersFile) if newLine [0] not in names: names.append (newLine [0]) else: continue newLine=",".join (newLine) f.write (f'\n{newLine } ') f.close morePioneersFile.close ()
Expert Solution
steps

Step by step

Solved in 1 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning