FREE INTERACTIVE ONLINE COURSE

Python 3

FOR BEGINNERS


"The first Python course that simply amazed me. Very well explained and easy to understand." (Alexandru Cosmin)

"The best Python course in Romania." (Iulian Geană)


ALL REVIEWS
LESSON 4
PAGE 4 / 4
Data Types
Home >>> Free Online Lessons, Python 3

The type() Function

At any time, we can find out the data type held by a specific variable at a given moment using the function type(variable_name).
Editor - lesson_4.py
       
Console / Output done
The type function receives the value of the variable x as an argument and returns the data type held by the variable as a result.

That's about all you need to know about data types for now.

You have learned about the data types, understanding their distinct characteristics and how to use them in Python. It's time to test your knowledge with a quiz, so you can reinforce what you've learned and ensure you have a solid grasp of these fundamental concepts.
Congratulations!
The lesson is now over.

 home   list  CONTENTS   perm_identity   arrow_upward