Casting in Python is the process of converting one data type to another. It enables you to change the type of a variable or value explicitly, such as converting a string to an integer or a float to an integer. The input function is used to prompt the user for input. It takes a string argument (prompt) that is displayed as a message to the user, asking for input. The function waits for the user to enter a value and press the Enter key.
For example, name = input("Enter your name: ") prompts the user to enter their name and stores the input in the variable name.
Python Casting
In Python, an expression may consist of mixed data types. In such cases, python changes data types of content internally. This process of internal data type conversion is called implicit type conversion. This can be done manually too.
Taking Input in Python
In Python, input () is a built-in function which is used to take input which takes input in the form of string. Then it will be type casted as per requirement.