input value using python code example
Example 1: how to take input in python
# 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)
Example 2: how to take input of something in python
name = input("What is your name? ")
print("Hi, " + name)