Determining Type

I can use the command print(type(variable)) to see what data type a variable is. We are using the print function. Whenever you see function_name(), this is a call to a function, we will discuss these in a later section.

C:\Users\JohnO>python
Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> a=400
>>> print(a)
400
>>> print(type(a))
<class 'int'>
>>> b=2.134
>>> print(type(b))
<class 'float'>
>>>