Detect if a variable holds int value or string value in Python
Detect if a variable holds int value or string value in Python: 1.Function Definition: The function check_variable_type takes a single argument variable. It uses is instance to check if variable is an instance of int. If the variable is an integer, it returns “Integer”. If the variable is an instance of str, it returns …
Detect if a variable holds int value or string value in Python Read More »