Built-in Data Types in Python (with code snippets) In Python, every value has a data type. There are various data types and in this thread, we will discuss some of the important ones. A Thread ๐งต๐
1๏ธโฃ Python Numbers Numbers are three types in Python 1. Integers
2. floating point numbers
3. complex numbers
2๏ธโฃ Strings in Python A string is a sequence of characters. In Python single, double, and triple quotes are used to define strings.
3๏ธโฃ List in Python Python list is an ordered sequence of items. We can store more than one item of different types in a list. Items in the list are accessed using an index.
4๏ธโฃ Tuple in Python Tuple is an ordered sequence of items same as list. The difference is that tuples are immutable and list is mutable.
5๏ธโฃ Python Set Set is an unordered collection of unique items, which means duplicates are not allowed. Set is defined using {} and items in set are separated by commas. set items are not ordered
6๏ธโฃ Dictionary in Python Dictionary is an unordered collection of key-value pairs. Dictionary is defined using {} and each item is a pair of keys and values.
Finally, we would like to thank @itsafiz for sharing his content with the community. ๐