Data types in Python

What is a data type in any programming language? Let's try to understand with a real life problem. We use water, oil, liquid soap, syrups, and so on in our day to day life. How do you categorize these items? Let's take another set of examples of bar soap, cell phone, and so on; what classification would you like to give these items? Answer to all these questions is simple: solid, liquid, and gases. Yes, we have these three broader classifications for any item that we have heard about or used in our day to day life. Same is the case in the programming world. Each and every thing needs to be categorized under different types. There are many types of data, such as numbers, strings, character, images, and so on.

Data types can be broadly categorized into five different types, listed as follows:

  • Numbers
  • String
  • Tuples
  • List
  • Dictionary
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.138.178