how to check whether input is string or not

whatever = input("Pick an integer > ")
    try:
        whatever_as_an_integer = int(whatever)
        print("That was an integer.")

    except ValueError:
        print("That is not an integer.")

Here is what the above code is Doing:
1. It’s asking the user to input a value.
2. It’s trying to convert the input to an integer.
3. If the input is an integer, it prints “That was an integer.”
4. If the input is not an integer, it prints “That is not an integer.”

The try/except statement is a way of handling errors.

The try statement is a way of saying “I’m going to try to do this, but if I get an error, I’m going to do something else.”

The except statement is a way of saying “If I get an error, I’m going to do this.”

The try/except statement is a way of handling errors.

The try statement is a way of saying “I’m going to try to do this, but if I get an error, I’m going to do something else.”

The except statement is a way of saying “If I get an error, I’m going to do this.”

The try/except statement is a way of handling errors.

The try statement is a way of saying “I’m going to try to do this, but if I get an error, I’m going to do something else.”

The except statement is a way of saying “If I get an error, I’m going to do this.”

The try/except statement is a way of handling errors.

The try statement is a way of saying “I’m going to try to do this, but if I get an error, I’m going to do something else.”

The except statement is a way of saying “If I get an error, I’m going to do this.”