官术网_书友最值得收藏!

  • Learn Python in 7 Days
  • Mohit Bhaskar N. Das
  • 156字
  • 2021-07-09 20:40:23

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
主站蜘蛛池模板: 镇坪县| 抚远县| 江孜县| 丽江市| 安宁市| 县级市| 新泰市| 伊川县| 峡江县| 红桥区| 乐山市| 六安市| 津南区| 章丘市| 新绛县| 阿勒泰市| 连平县| 竹北市| 贡觉县| 金门县| 拉萨市| 宁波市| 临湘市| 攀枝花市| 同江市| 绥化市| 微山县| 资溪县| 达州市| 东乡| 林甸县| 上饶县| 华阴市| 马边| 保亭| 布拖县| 岑巩县| 小金县| 武邑县| 辛集市| 城口县|