Taking String Input

Lesson Progress
0% Complete

By default, the input function in python returns a String value.

num_input = input ("Enter number :") 
print(num_input) 
string_input = input("Enter name : ") 
print(string_input) 

# Printing type of input value with Values

print (f"type of number {type(num_input)}, and value is {num_input}") 
print (f"type of string {type(string_input)}, and value is {string_input}")