3 Answers
+ 3
For string:
n=input( )
For integer number:
n= int( input( ) )
You can check this lesson:
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2426/
0
n =input()# stores input in n
0
You can use input() function.
Let's say you're making a variable which is n, and you want to have an input to the variable you have just make.
# This will ask the input and put it to the n variabel
n = input()
You also can put some question on the input by doing this :
n = input("How are you? ")
The input that you give in input() will stores the value type(str) to the variable. In case you want to have type(int) value, you can use :
n = int(input())