input file python 3 code example
Example: file input python
# import fileinput
import fileinput
# Using fileinput.input() method
for line in fileinput.input(files ='gfg.txt'):
print(line)
# import fileinput
import fileinput
# Using fileinput.input() method
for line in fileinput.input(files ='gfg.txt'):
print(line)