how to take input from file in python 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)