Is there any way to accept either methods of input?
I'm currently taking input from cmd only by using sys.argv[1]
but I need to make it to
accept both ways.
for example, the program should be able to take the input from either one of the following unix commands:
% cat text.txt | ./python3.py > out.txt
% ./python3.py text.txt > out.txt