# Taking string input
a = input("Enter a string: ")
print("String is: ", a)
# Taking integer input
b = int(input("Enter an integer: "))
print("Integer is: ", b)
# Taking float input
c = float(input("Enter a float value: "))
print("Float value is: ", c)
age = input('what is your age?: ')
print("You are "+age + " years old")
ans : what is your age?: 23
You are 23 years old
#input method in python.A selected question would prompt and user should ans that.
#after that programme will show age with a text message.
# Python 3
txt = input("Type something to test this out: ")
# Note that in version 3, the print() function
# requires the use of parenthesis.
print("Is this what you just said? ", txt)
// if you want to take single int input
a=int(input())
// if you want n elements of array a as input from console/user
a = list(map(int,input().strip().split()))
# u can also covert it to set,tuple etc
# ex. set(map(int, input().strip().split()))
NOTE: suppose if you want a list with duplicates removed
list(set(map(int, input().strip().split())))
also note map is a method and is not hashmap which is actually disct in python.
and ommitting .strip() in 2nd argument of map func might also work.
# more explaination of above:
https://www.quora.com/What-does-the-following-line-mean-in-Python-list-map-int-input-strip-split-I
Use the input() method
Example
#code
name = input("Name Please: ")
print(f'Hello {name}, what can I do for you?')
#console
Name Please:
>>> Steve
Hello Steve, what can I do for you?