Computer Science, asked by Sheren8427, 3 months ago

Which one of the following syntaxes is the correct syntax to read from a simple text file stored in ''d:\python.txt''?
Infile = open(''d:\\python.txt'', ''r'')
Infile = open(file=''d:\\\python.txt'', ''r'')
Infile = open(''d:\python.txt'',''r'')
Infile = open.file(''d:\\python.txt'',''r'')

Answers

Answered by THISANDTHAT
0

Answer:

3rd one

Explanation:

infile = open(''d:\python.txt'',''r'')

infile.read( )

infile.close( )

Similar questions