{"id":9617,"date":"2020-03-20T14:21:55","date_gmt":"2020-03-20T08:51:55","guid":{"rendered":"http:\/\/ivyproschool.com\/blog\/?p=9617"},"modified":"2021-06-11T14:51:40","modified_gmt":"2021-06-11T09:21:40","slug":"top-5-python-data-types-that-you-should-know","status":"publish","type":"post","link":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/","title":{"rendered":"Top 5 Python Data Types that you should know"},"content":{"rendered":"<p><a href=\"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\" wp-image-9650 aligncenter\" src=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/BANNER_FINAL-300x139.png\" alt=\"Python Data Types\" width=\"453\" height=\"210\" srcset=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/BANNER_FINAL-300x139.png 300w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/BANNER_FINAL-768x356.png 768w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/BANNER_FINAL-1024x474.png 1024w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/BANNER_FINAL.png 1080w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/a><\/p>\n<p>Data types are the building blocks of every programming language. Any variable that stores a value contains some data which can be Boolean, string, number, etc. We talk in terms of classes and objects in Python. Data types are classes and the variables are objects. We can operate a variable based on what kind of data it has stored. In this article, we are going to explain all the data types available in Python and how we operate on them.<\/p>\n<p>First of all, let us understand the rules to assign a variable.<\/p>\n<ul>\n<li>A variable can have a short name (like x and y) or a more descriptive name (age, car_name, total_volume)<\/li>\n<li>Name of a variable must start with a letter or an underscore character<\/li>\n<li>Do not start a variable name with a number<\/li>\n<li>A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )<\/li>\n<li>Variable names are case-sensitive (School_Name, school_name, and SCHOOL_NAME are three different variables)<\/li>\n<li>Variables cannot be named with words used in Python internally like for, in, not, list, tuple, dict, etc.<\/li>\n<\/ul>\n<h2>Kind of Python Data Types &#8211;<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9643\" src=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/blog-1.png\" alt=\"Python Data Types\" width=\"972\" height=\"450\" srcset=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/blog-1.png 1080w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/blog-1-300x139.png 300w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/blog-1-768x356.png 768w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/blog-1-1024x474.png 1024w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/p>\n<p>Python has 5 Standard data types which are listed below.<\/p>\n<ul>\n<li>Numeric<\/li>\n<li>Sequence Type<\/li>\n<li>Dictionary<\/li>\n<li>Sets<\/li>\n<li>Boolean<\/li>\n<\/ul>\n<h3>Numeric &#8211;<\/h3>\n<p>When we store a numeric value in a variable, it automatically is classified as a numeric Python data type. There are 3 different numeric data types which are explained below.<\/p>\n<p>1) <strong>Int (plain integers)<\/strong> &#8211; Any positive or negative whole number is called an integer and given int data type.<\/p>\n<p>2) <strong>Float (floating point real values)<\/strong> &#8211; Real numbers with decimal values are called float.<\/p>\n<p>3) <strong>Complex numbers<\/strong> &#8211; This type is used rarely in Python. A complex number is represented by X + iY where X and Y are floats and i is the square root of -1 (the result of which is an imaginary number)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9648 aligncenter\" src=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Numeric-data-types-300x178.png\" alt=\"Numeric data types\" width=\"300\" height=\"178\" srcset=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Numeric-data-types-300x178.png 300w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Numeric-data-types-768x454.png 768w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Numeric-data-types-1024x606.png 1024w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Numeric-data-types.png 1080w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><strong>Please note<\/strong> &#8211; <span class=\"ILfuVd\"><span class=\"e24Kjd\">Python 2 has two integer types &#8211; integer and a long integer. There is no &#8216;long integer&#8217; in Python 3 anymore.<\/span><\/span><\/p>\n<p>Now let us see how to work on this. We are defining three variables of different data types. In Python, we do not have to explicitly mention data type during the assignment of a variable. Applying the &#8216;Type&#8217; function on a variable helps us identify the data type. We have used print command to get the result.<\/p>\n<p>[php]<br \/>\nstandard = 10 # integer<br \/>\ncar_loan_amount = 10000.90 # float<\/p>\n<p>import cmath<br \/>\ncomplex_number = complex(10,20)<br \/>\nprint(type(standard))<br \/>\nprint(type(car_loan_amount))<br \/>\nprint(type(complex_number))<br \/>\nprint(complex_number.real)<br \/>\nprint(complex_number.imag)<br \/>\n[\/php]<\/p>\n<h3>Sequence Type &#8211;<\/h3>\n<p>There are 3 data types which comprise of a sequence of characters called string, or a sequence of mixed data types called a list or tuple.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9651 aligncenter\" src=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Sequence-types-300x178.png\" alt=\"Sequence Data Type\" width=\"300\" height=\"178\" srcset=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Sequence-types-300x178.png 300w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Sequence-types-768x454.png 768w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Sequence-types-1024x606.png 1024w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Sequence-types.png 1080w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><strong>String &#8211;<\/strong><\/p>\n<p>A series of characters within a single, double or triple quotes is called a string. There is no character data type in Python like other languages. Let us see how to define a string variable along with its data type. In the below list of codes<\/p>\n<div>\n<div>\n<p>[php]<br \/>\nschool_name = &#8216;DPS&#8217; # str<br \/>\nprint(type(school_name))<\/p>\n<p>string_text = &#8221;&#8217;DPS is a very famous school&#8221;&#8217; # str<br \/>\nprint(type(string_text))<br \/>\n[\/php]<\/p>\n<\/div>\n<\/div>\n<div>Various operations can be performed on a string variable. For example,<\/div>\n<div>1) Finding the length of the string using &#8216;len&#8217; function<\/div>\n<div>2) Accessing elements of a string variable<\/div>\n<div>3) Reversing a string<\/div>\n<div>4) Concatenating two strings<\/div>\n<div><\/div>\n<div>\n<div>We are providing codes in serial order.<\/div>\n<\/div>\n<div>\n<p>[php]<br \/>\n#1 &#8211; length<br \/>\nlen(string_text)<br \/>\nlen(school_name)<br \/>\n#2 &#8211; Accessing the 6th element in the string<br \/>\nstring_text[5]<\/p>\n<p>#2 &#8211; Accessing a sequence of elements<br \/>\nstring_text[6:10]<\/p>\n<p>#3 &#8211; Reversing the string<br \/>\nschool_name[::-1]<br \/>\nstring_text[::-1]<\/p>\n<p>#4 &#8211; String concatenation<br \/>\nstring_text + &quot; &quot; + school_name<br \/>\n[\/php]<\/p>\n<\/div>\n<p><strong>List &#8211;<\/strong><\/p>\n<p>It is a compound data type. We can store various data types as elements in a list. To explain in other words, a list can consist of an integer, a string, as well as another list inside it. Every element in a list can be accessed with its index which starts with 0. A list is mutable. That is we can delete and modify its elements. Let us see how we can create a list.<\/p>\n<div>\n<div>\n<p>[php]<br \/>\n#creating a list<br \/>\nlist1 = [1,2,&#8217;a&#8217;,&#8217;b&#8217;,&#8217;world cup&#8217;]<\/p>\n<p>#creating a nested list that is a list within a list<br \/>\nlist2 = [1,2,&#8217;a&#8217;,&#8217;b&#8217;,&#8217;world cup&#8217;, [1,2,&#8217;a&#8217;,&#8217;b&#8217;,&#8217;world cup&#8217;]]<br \/>\n[\/php]<\/p>\n<\/div>\n<\/div>\n<div>\n<div>Various operations that can be performed on a list variable are as follows:<\/div>\n<h4>1) Accessing elements of a list<\/h4>\n<div>As mentioned earlier, any element can be accessed using the index. We created a list named list1 above. Let us see how we can get to the various elements in it.<\/div>\n<\/div>\n<div>\n<p>[php]<br \/>\n#getting the element at the second index<br \/>\nprint(list1[2])<\/p>\n<p>#getting a sequence of elements from 1st to 3rd index can be made using [1:4] which follows [inclusion : exclusion] rule<br \/>\nprint(list1[1:4])<br \/>\n[\/php]<\/p>\n<\/div>\n<div>\n<h4>2) Appending an element or a list at the end<\/h4>\n<div>If we want to append a new element to list, we can do that by using the &#8216;append&#8217; method and get the element added at the end of the list.<\/div>\n<\/div>\n<div>\n<p>[php]<br \/>\n#append function<br \/>\nlist1.append(&#8216;cricket&#8217;)<br \/>\nprint(list1)<\/p>\n<p>#appending another list<br \/>\nlist1.append(list2)<br \/>\nprint(list1)<br \/>\n[\/php]<\/p>\n<\/div>\n<div>\n<div>\n<h4>3) Extending the list with an element or a list<\/h4>\n<div>Adding a new element at the end to extend the list is simple. It must be noted that the element or elements to be added must be placed as an iterable in the &#8216;extend&#8217; method. The below commands will give you a clear idea.<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<div>\n<p>[php]<br \/>\n(list1.extend(list2))<br \/>\nprint(list1)<br \/>\n[\/php]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div>Please note the difference between the outputs of append and extend from the screenshots.<\/div>\n<div>\n<div>\n<h4>4) Finding the index of elements in a list<\/h4>\n<div>Many times we need to locate the index of a particular element in a list. We can identify that using the following command.<\/div>\n<\/div>\n<\/div>\n<div>\n<p>[php]list1.index(&#8216;a&#8217;)[\/php]<\/p>\n<\/div>\n<div>\n<div>\n<h4>5) Counting the occurrences of an element<\/h4>\n<div>If we want to count the occurrences of a particular element in the list, we can use the below command.<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<div>\n<p>[php]list1.count(&#8216;a&#8217;)[\/php]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<h4>6) Inserting an element at any index position<\/h4>\n<p>Insert takes in two arguments: insert(index, object) This method places the object at the index supplied.<\/p>\n<div>\n<div>\n<p>[php]<br \/>\nlist1.insert(2,&#8217;inserted&#8217;)<br \/>\nprint(list1)<br \/>\n[\/php]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h4>7) Reversing a list<\/h4>\n<div>\n<div>\n<p>[php]<br \/>\nlist1.reverse()<br \/>\nprint(list1)<br \/>\n[\/php]<\/p>\n<\/div>\n<\/div>\n<div>Some other methods that we can apply are remove, pop, sort, etc.<\/div>\n<div>\n<div>\n<div>\n<h3>Tuple &#8211;<\/h3>\n<p>Python provides an immutable compound data type called Tuple. Similar to a list, a tuple can store elements of various data types but we can not edit it after creation. A few ways in which we can create a tuple are:<\/p>\n<\/div>\n<div>\n<div>\n<p>[php]#create an empty tuple<br \/>\ntuple()<br \/>\nt()<br \/>\n#create a tuple with 4 elements<\/p>\n<p>t = (1,2,3,4)<br \/>\nprint(t)<br \/>\n[\/php]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<div>\n<p>Some operations we can perform on a tuple are finding max, min, count, index, etc. to show a few methods. Let us see their commands.<\/p>\n<div>\n<div>\n<div>\n<p>[php]<br \/>\ntup = (10,20,30,30,20,10,40,40,40,50,100)<br \/>\nprint(tup.count(30))<br \/>\nprint(tup.index(40))<br \/>\nprint(min(tup))<br \/>\nprint(max(tup))<\/p>\n<p>[\/php]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<h3>Dictionary &#8211;<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9653 aligncenter\" src=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Dictionary-300x178.png\" alt=\"Dictionary data type\" width=\"300\" height=\"178\" srcset=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Dictionary-300x178.png 300w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Dictionary-768x454.png 768w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Dictionary-1024x606.png 1024w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Dictionary.png 1080w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Another compound data type in Python is a dictionary. In this, we can save elements in a combination of key and value pairs and we can use this as a map. The syntax of a dictionary is { key1: value1, key2: value2, &#8230;. } . The command to create a dictionary is provided.<\/p>\n<div>\n<div>\n<p>[php] dictionary1 = { &#8216;name&#8217;:&#8217;ivy&#8217; , &#8216;class&#8217;:&#8217;python&#8217;, &#8216;month&#8217;:&#8217;march&#8217;, &#8216;year&#8217;:2020} [\/php]<\/p>\n<\/div>\n<\/div>\n<div>Some of the operations that we can perform on a dictionary are:<\/div>\n<h4>1) Finding all the keys<\/h4>\n<\/div>\n<\/div>\n<div>We use method keys() on the dictionary variable.<\/div>\n<div>\n<div>\n<div>\n<p>[php] dictionary1.keys() [\/php]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<h4>2) Finding all the values<\/h4>\n<p>We use method values().<\/p>\n<div>\n<div>\n<p>[php] dictionary1.values() [\/php]<\/p>\n<\/div>\n<\/div>\n<h4>3) Updating the value of a key<\/h4>\n<p>The Update method will add a new Key value pair if the key is not found. Else, it updates the value of the existing key.<\/p>\n<div>\n<div>\n<div>\n<div>\n<p>[php]<br \/>\ndictionary1.update({&#8216;batch&#8217;:100})<br \/>\nprint(dictionary1)<br \/>\n[\/php]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<div>\n<div>\n<div>\n<h3>Sets &#8211;<\/h3>\n<p><a href=\"ty\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9654 aligncenter\" src=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Set-300x178.png\" alt=\"sets data type\" width=\"300\" height=\"178\" srcset=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Set-300x178.png 300w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Set-768x454.png 768w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Set-1024x606.png 1024w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Set.png 1080w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<div>\n<div>\n<div>\n<div>\n<div>Sets are a collection of unique similar objects. It is iterable and mutable. Sets can help us identify if an element exists or not in a highly optimized manner which is not the same in a list. We need to explicitly mention the term set while creating one. The values assigned to a set must be passed in a list or a tuple or any other data type.<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<div>\n<p>[php]<br \/>\nset1 = set([1,2,3,4])<br \/>\ntype(set1)<br \/>\n[\/php]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div>A few methods we can apply to a set are<\/div>\n<div>1) Adding a new element<\/div>\n<div>2) Removing an element<\/div>\n<div>3) Identifying whether a set is a subset or a superset of another set<\/div>\n<div>4) Union, Intersection, and difference between 2 sets<\/div>\n<div>\n<p>[php]<br \/>\n#1 &#8211; adding<br \/>\nset1.add(5)<br \/>\nset1<\/p>\n<p>#2 &#8211; removing<br \/>\nset1.remove(5)<\/p>\n<p>#3 &#8211; subset\/superset gives a true or false output<br \/>\nset1 = set([1,2,3,4,5,6,7,8,9])<br \/>\nset2 = set([3,6,9])<br \/>\nset1.issubset(set2)<br \/>\nset1.issuperset(set2)<\/p>\n<p>#4 set operations<br \/>\nset1.union(set2)<br \/>\nset1.intersection(set2)<br \/>\nset1.difference(set2)<br \/>\n[\/php]<\/p>\n<\/div>\n<div>Please note that the slicing of a set does not exist as it does not support indexing.<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3>Boolean &#8211;<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9655 aligncenter\" src=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/boolean-300x178.png\" alt=\"Boolean data type\" width=\"300\" height=\"178\" srcset=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/boolean-300x178.png 300w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/boolean-768x454.png 768w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/boolean-1024x606.png 1024w, https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/boolean.png 1080w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<div>\n<div>\n<div>\n<div>\n<div>\n<div>\n<div>\n<div>It is another data type that contains one of the two in-built values True or False. We saw one example above.<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<div>\n<div>\n<div>\n<h2>Conclusion &#8211;<\/h2>\n<div>\n<p>All the various data types which one can require while working in Python have been explained. Please do let us know if there is any doubt regarding any command or data type. Next, we are going to discuss Loops in Python. Stay Tuned.!!<\/p>\n<p>To know more about learning Python from our industry expert trainers, you can visit us at <a href=\"https:\/\/ivyproschool.com\/\">Ivy Professional School<\/a>.<\/p>\n<div>\n<div><\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Data types are the building blocks of every programming language. Any variable that stores a value contains some data which can be Boolean, string, number, etc. We talk in terms of classes and objects in Python. Data types are classes and the variables are objects. We can operate a variable based on what kind of data it has stored. In this article, we are going to explain all the data types available in Python and how we operate on them. First of all, let us understand the rules to assign a variable. A variable can have a short name (like x and y) or a more descriptive name (age, car_name, total_volume) Name of a variable must start with a letter or an underscore character Do not start a variable name with a number A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ ) Variable names are case-sensitive (School_Name, school_name, and SCHOOL_NAME are three different variables) Variables cannot be named with words used in Python internally like for, in, not, list, tuple, dict, etc. Kind of Python Data Types &#8211; Python has 5 Standard data types which are listed below. Numeric Sequence Type Dictionary Sets Boolean [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":9649,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,715,552],"tags":[805,808,658,716,806,807],"class_list":["post-9617","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-analytics","category-machine-learning-ai","category-technology","tag-data-types","tag-dictionary","tag-list","tag-python","tag-sets","tag-tuple"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>5 Python Data Types | Learn about Python Data Types | Ivy Pro School<\/title>\n<meta name=\"description\" content=\"In this article, we explain all the Python Data Types namely List, Tuple, Set, Dictionary, String, Integer, and Boolean along with some commands to operate.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"5 Python Data Types | Learn about Python Data Types | Ivy Pro School\" \/>\n<meta property=\"og:description\" content=\"In this article, we explain all the Python Data Types namely List, Tuple, Set, Dictionary, String, Integer, and Boolean along with some commands to operate.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/\" \/>\n<meta property=\"og:site_name\" content=\"R vs Python: Which Analytics Tool Should You Choose for Data Science?\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/ivyproschool\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-20T08:51:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-11T09:21:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Python-Data-Types.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"639\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ivy Professional School\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ivyproschool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ivy Professional School\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/\"},\"author\":{\"name\":\"Ivy Professional School\",\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/#\\\/schema\\\/person\\\/31fdab8559dd3db99173764bfb60215d\"},\"headline\":\"Top 5 Python Data Types that you should know\",\"datePublished\":\"2020-03-20T08:51:55+00:00\",\"dateModified\":\"2021-06-11T09:21:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/\"},\"wordCount\":1542,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/Python-Data-Types.jpeg\",\"keywords\":[\"Data Types\",\"Dictionary\",\"list\",\"python\",\"Sets\",\"Tuple\"],\"articleSection\":[\"Data Analytics\",\"Machine Learning &amp; AI\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/\",\"url\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/\",\"name\":\"5 Python Data Types | Learn about Python Data Types | Ivy Pro School\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/Python-Data-Types.jpeg\",\"datePublished\":\"2020-03-20T08:51:55+00:00\",\"dateModified\":\"2021-06-11T09:21:40+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/#\\\/schema\\\/person\\\/31fdab8559dd3db99173764bfb60215d\"},\"description\":\"In this article, we explain all the Python Data Types namely List, Tuple, Set, Dictionary, String, Integer, and Boolean along with some commands to operate.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/Python-Data-Types.jpeg\",\"contentUrl\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/Python-Data-Types.jpeg\",\"width\":1080,\"height\":639,\"caption\":\"Python Data Types\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/top-5-python-data-types-that-you-should-know\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Top 5 Python Data Types that you should know\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/\",\"name\":\"Ivy Professional School | Official Blog\",\"description\":\"Confused between R and Python for your data science journey? Discover the key differences in data visualization, handling capabilities, speed, and ease of learning.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/#\\\/schema\\\/person\\\/31fdab8559dd3db99173764bfb60215d\",\"name\":\"Ivy Professional School\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/866b09293f13d461b399bb9a40607e85623ede13d844f763bf665689cb0d1452?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/866b09293f13d461b399bb9a40607e85623ede13d844f763bf665689cb0d1452?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/866b09293f13d461b399bb9a40607e85623ede13d844f763bf665689cb0d1452?s=96&d=mm&r=g\",\"caption\":\"Ivy Professional School\"},\"sameAs\":[\"http:\\\/\\\/www.ivyproschool.com\",\"https:\\\/\\\/facebook.com\\\/ivyproschool\",\"https:\\\/\\\/instagram.com\\\/ivyproschool\",\"https:\\\/\\\/x.com\\\/ivyproschool\",\"https:\\\/\\\/youtube.com\\\/ivyproschool\"],\"url\":\"https:\\\/\\\/ivyproschool.com\\\/blog\\\/author\\\/prateek\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"5 Python Data Types | Learn about Python Data Types | Ivy Pro School","description":"In this article, we explain all the Python Data Types namely List, Tuple, Set, Dictionary, String, Integer, and Boolean along with some commands to operate.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/","og_locale":"en_US","og_type":"article","og_title":"5 Python Data Types | Learn about Python Data Types | Ivy Pro School","og_description":"In this article, we explain all the Python Data Types namely List, Tuple, Set, Dictionary, String, Integer, and Boolean along with some commands to operate.","og_url":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/","og_site_name":"R vs Python: Which Analytics Tool Should You Choose for Data Science?","article_author":"https:\/\/facebook.com\/ivyproschool","article_published_time":"2020-03-20T08:51:55+00:00","article_modified_time":"2021-06-11T09:21:40+00:00","og_image":[{"width":1080,"height":639,"url":"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Python-Data-Types.jpeg","type":"image\/jpeg"}],"author":"Ivy Professional School","twitter_card":"summary_large_image","twitter_creator":"@ivyproschool","twitter_misc":{"Written by":"Ivy Professional School","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/#article","isPartOf":{"@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/"},"author":{"name":"Ivy Professional School","@id":"https:\/\/ivyproschool.com\/blog\/#\/schema\/person\/31fdab8559dd3db99173764bfb60215d"},"headline":"Top 5 Python Data Types that you should know","datePublished":"2020-03-20T08:51:55+00:00","dateModified":"2021-06-11T09:21:40+00:00","mainEntityOfPage":{"@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/"},"wordCount":1542,"commentCount":0,"image":{"@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/#primaryimage"},"thumbnailUrl":"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Python-Data-Types.jpeg","keywords":["Data Types","Dictionary","list","python","Sets","Tuple"],"articleSection":["Data Analytics","Machine Learning &amp; AI","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/","url":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/","name":"5 Python Data Types | Learn about Python Data Types | Ivy Pro School","isPartOf":{"@id":"https:\/\/ivyproschool.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/#primaryimage"},"image":{"@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/#primaryimage"},"thumbnailUrl":"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Python-Data-Types.jpeg","datePublished":"2020-03-20T08:51:55+00:00","dateModified":"2021-06-11T09:21:40+00:00","author":{"@id":"https:\/\/ivyproschool.com\/blog\/#\/schema\/person\/31fdab8559dd3db99173764bfb60215d"},"description":"In this article, we explain all the Python Data Types namely List, Tuple, Set, Dictionary, String, Integer, and Boolean along with some commands to operate.","breadcrumb":{"@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/#primaryimage","url":"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Python-Data-Types.jpeg","contentUrl":"https:\/\/ivyproschool.com\/blog\/wp-content\/uploads\/2015\/08\/Python-Data-Types.jpeg","width":1080,"height":639,"caption":"Python Data Types"},{"@type":"BreadcrumbList","@id":"https:\/\/ivyproschool.com\/blog\/top-5-python-data-types-that-you-should-know\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ivyproschool.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Top 5 Python Data Types that you should know"}]},{"@type":"WebSite","@id":"https:\/\/ivyproschool.com\/blog\/#website","url":"https:\/\/ivyproschool.com\/blog\/","name":"Ivy Professional School | Official Blog","description":"Confused between R and Python for your data science journey? Discover the key differences in data visualization, handling capabilities, speed, and ease of learning.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ivyproschool.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ivyproschool.com\/blog\/#\/schema\/person\/31fdab8559dd3db99173764bfb60215d","name":"Ivy Professional School","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/866b09293f13d461b399bb9a40607e85623ede13d844f763bf665689cb0d1452?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/866b09293f13d461b399bb9a40607e85623ede13d844f763bf665689cb0d1452?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/866b09293f13d461b399bb9a40607e85623ede13d844f763bf665689cb0d1452?s=96&d=mm&r=g","caption":"Ivy Professional School"},"sameAs":["http:\/\/www.ivyproschool.com","https:\/\/facebook.com\/ivyproschool","https:\/\/instagram.com\/ivyproschool","https:\/\/x.com\/ivyproschool","https:\/\/youtube.com\/ivyproschool"],"url":"https:\/\/ivyproschool.com\/blog\/author\/prateek\/"}]}},"_links":{"self":[{"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/posts\/9617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/comments?post=9617"}],"version-history":[{"count":2,"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/posts\/9617\/revisions"}],"predecessor-version":[{"id":10577,"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/posts\/9617\/revisions\/10577"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/media\/9649"}],"wp:attachment":[{"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/media?parent=9617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/categories?post=9617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ivyproschool.com\/blog\/wp-json\/wp\/v2\/tags?post=9617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}