05 Input in Python
05 Input in Python
1 Input
• to take the input from the user. In python ‘input()’ function is used to allow this.
• by default it takes str datatype
[10]: n = input()
25
[11]: n
[11]: '25'
[12]: type(n)
[12]: str
[13]: '27'
[17]: type(n1)
[17]: str
[14]: 26
[15]: type(n2)
[15]: int
1
[18]: # one more different example
name = input('enter your name')
print('it was nice talking to you ' + name+' !')