Question: Consider the following main.py script. what is the output when the script main.py is executed ? def write ( n ) : f = open
Consider the following main.py script. what is the output when the script main.py is executed
def writen:
f open datatxta
f writestrn
fclose
def add
tofileab :
S
for e in rangeab :
s ea
writes
def read:
f opendatatxt r
printfread
fclose
addtofile
read
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
