Computer Science, asked by vy372984, 19 days ago

how to create a variable in python using input function and then check the type of it ??​

Answers

Answered by RisingStarVedika
2

Answer:

You can also use it to check the type of variable using the type() method and perform an action based on its type. Write a python program to check if a variable is an integer or a string using type(). var = input("Enter the value: ") if type(var). __name__ == 'str': print "var is a string!" elif type(var).

Answered by vermaditya5678
0

Answer:

Python user input from the keyboard can be read using the input() built-in function. The input from the user is read as a string and can be assigned to a variable. After entering the value from the keyboard, we have to press the “Enter” button.

PLS MARK ME BRANLIEST

Similar questions