• Register
110 points
7

 

Overview stdin in python 

In this tutorial, we will talk about how to read input from stdin module today. Keyboard and monitor screen is generally considered as standard input and output. Standard error is where error is detected.  The standard printer handle is the device through which we do the printing. Because these standard handles are used by the computer automatically, we have to use them before we use them.  No need to tell the computer. Today we tell you in our website kodlogs that it works faster than standard input / output and consumes less memory. Standard input / output which is usually stream input.  Also called output. The most commonly used method for reading and writing on files. 

(Stdin)means standard input and (Stdout )means standard output. (Stderr)means standard error. (Stdprn) Means printer.

3 Ways in which we can take input from stdin in Python.

 1.sys.stdin

 2.input()

 3.fileinput.input()

Example 

inp = input("Tania&Jimcoder ") 

print(inp) 
                   
OUTPUT 
Tania&Jimcoder 

                  

 

 

110 points
7