0
Can anyone tell me how to take user input? ?
3 Answers
- 1
X = input()
#Remember X will be str,so if you want int
X = int(input())
(pls watch my game at playground mamed Battleship_game and like it.I really want people to see it)
- 1
In python 2.x, input() was used to take input from user but in python 3.x, raw_input() is used. You can also display message stating user what type of input should be entered.
e.g. age=int(raw_input("Enter your age"))
Hope this helps.
- 2
raw_input()