1
The input() function is used to accept user input from the console, but it always returns the data as a string (str) type by default.
2
To perform mathematical operations on user input, you must explicitly convert the string into an integer using int() or a float using float().
3
You can optimize code lines by wrapping the input() function directly inside the conversion function, such as int(input('Enter value: ')).
4
Character inputs can be handled by fetching specific indices from the string input (e.g., input()[0]) to limit the input to a single character.
5
The eval() function evaluates mathematical expressions passed as strings directly from the user input.
6
Command-line arguments can be accessed using the sys module via sys.argv, where sys.argv[0] is the script filename and subsequent indices represent the passed arguments.