Monday, July 9, 2018

How do you find the type of a variable in Python?

Sometimes they can be found by inspection but the correct way is to use the type() function.

These are the standard data types in Python.

Numbers
String
List
Tuple
Dictionary
Bool

But there are many more.

You can easily find the type using the type() function in Python. Here are some examples.


type_0

Here are some more.

type_1

No comments: