0
In python how to read input data like a file from console?
4 Answers
+ 7
Dadaxon Xudayberganov 🇺🇿🇺🇿🇺🇿 ,
it would be helpful if you could make an input sample.
> to read from a file, we have to open this file to read the whole content or a part of the content
> how will the input from the console should be done? line by line?
+ 4
read input from the console like a file you need to import the sys.stdin library
This will read each line of input from the console and print it.
I hope this helps
+ 3
Dadaxon Xudayberganov 🇺🇿🇺🇿🇺🇿 I'm glad I could help
+ 2
Thanks YIPMONG Jr .it is helpful