Class 16 Input and Output
Class 16 Input and Output
keyboard.
1.raw_input()
2.input()
10--->int
'scodeen'--->str
10.5--->float
Note:- But in python3 we have only input() method and eaw_input() method is not
available.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
eval():- evaluate
ex:-
x = eval(input('First number:'))
y = eval(input('second number'))
print(x+y)
10--->int
'scodeen'--->str
10.5--->float
Note:- But in python3 we have only input() method and eaw_input() method is not
available.
python 3 input() function behaviour exactly same as raw_input() method of py2 that
is every input value is treated as str type only.
Output:-