I'm not sure how to write it in Qiita's first post, but I will write down the convenient usage of python little by little.
import sys #Because sys.stdin is required when switching standard input to a file fn = input () #Enter text file name / If you keep the keyboard,'-' if not fn =='-': #'-' is the keyboard sys.stdin = open (fn) # By setting fn to stdin, input will be executed from file fn thereafter. ... # Describe the process sys.stdin.close () #close standard input file
I'm a beginner. Thank you for your supervision.
Recommended Posts