type of a variable python code example Example 1: python variable Python variable Example 2: check type of variable in python str = "Hello" type(str)