What are the common built-in data types in Python?

The common built-in data types in Python are:

String

A sequence of characters in called a string. They are declared within single or double-quotes. E.G., ‘Sana’, ‘she is going to the market’, etc.

Set

Sets are a collection of unique items that are not in order. e.g. {7, 6, 8}.

Dictionary

A dictionary stores values in key and value pairs where each value can be accessed through its key. The order of items is not important. E.g. {1:’apple’, 2:’mango’, 3:’banana’}.

Boolean

There are 2 Boolean values – True and False.

Popular Posts

Author

  • Naveen Pandey Data Scientist Machine Learning Engineer

    Naveen Pandey has more than 2 years of experience in data science and machine learning. He is an experienced Machine Learning Engineer with a strong background in data analysis, natural language processing, and machine learning. Holding a Bachelor of Science in Information Technology from Sikkim Manipal University, he excels in leveraging cutting-edge technologies such as Large Language Models (LLMs), TensorFlow, PyTorch, and Hugging Face to develop innovative solutions.

    View all posts
Spread the knowledge
 
  

Join the Discussion

Your email will remain private. Fields with * are required.