How can we input data in python like that of ideone. like i have input stored in file and i want to give whole input at once through stdin.
Check for you answer :
let the file be “fname.txt” and python code be “a.py”. Put them in the same folder. Then use terminal in ubuntuor command prompt in windows to go to the folder where they are and use python a.py < fname.txt. You can also re-direct the output it to another text file by doing python a.py < fname.txt > op.txt
Try to checkout the this link]
Try the following:
cat input_file.txt | python script.py
i think the link in dead.
url is not correct…