Input Function in Python - Ryzen Hunt

The input() function in python
While creating a program, programmers or developers often need to interact with users, to gather data. In other input() function is used to collect data from users as string.
examples 1:
>>> a = input("Enter your name : ")
>>>print(a)
Output
Enter your name: Ryzen Hunt
Ryzen Hunt

example 2:
>>>R = input("Enter the first name : ")
>>>H = input("Enter the second name : ")
>>>A = R+H
>>>print(A)
Output
Enter the first name: Ryzen
Enter the second name: Hunt
Ryzen Hunt

Note: Data provided by the user is considered a string.

example 3:
>>> x = int(input("Enter the first number : "))
>>> y = int(input("Enter the second number : "))
>>> z = x+y
>>>print(z)
Output
Enter the first number: 45
Enter the second number: 5
50

Please share this with your friends and Don't forget to share your comments and valuable suggestions and feedback.
To visit our Python Course series click here, and for HTML course series click here.