[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"article-11":3},{"id":4,"title":5,"title_en":6,"abstract":7,"abstract_en":8,"content":9,"content_en":10,"category":11,"banner_id":12,"banner_path":13,"tags":14,"is_recommend":16,"prev_article":17,"next_article":21,"created_at":25},11,"python基础--什么是数据类型","python basics - what are data types","数据类型是每种编程语言必备属性，只有给数据赋予明确的数据类型，计算机才能对数据进行处理运算，因此，正确使用数据类型是十分必要的，不同的语言，数据类型类似，但具体表示方法有所不同","Data type is a necessary attribute of every programming language, only by giving the data a clear data type, the computer can process the data, therefore, the correct use of data type is very necessary, different languages, data types are similar, but the specific representation method is different","#### 什么是数据类型\n\n简单的理解，存储数据的容器\n\n> 数据类型是每种编程语言必备属性，只有给数据赋予明确的数据类型，计算机才能对数据进行处理运算，因此，正确使用数据类型是十分必要的，不同的语言，数据类型类似，但具体表示方法有所不同\n\n以下是Python编程常用的数据类型：\n\n- Number（数字）\n- String（字符串）\n- List（列表）\n- Tuple（元组）\n- Set（集合）\n- Dictionary（字典）\n\n不可变数据（3 个）：Number（数字）、String（字符串）、Tuple（元组）\n\n可变数据   （3 个）：List（列表）、Dictionary（字典）、Set（集合）\n\n可用 python 内置函数 type() 函数进行查看数据类型\n\n```python\nint_1 = 12\nprint(int_1, type(int_1))\nfloat_1 = 12.33\nprint(float_1, type(float_1))\ncomplex_1 = 2 + 7j\nprint(complex_1, type(complex_1))\nbool_1=True\nprint(bool_1,type(bool_1))\nstr_1='fengfeng'\nprint(str_1,type(str_1))\nlist_1=[]\ntuple_1=()\ndict_1={}\nset_1=set()                          #空集合的创建有点特殊\nprint(list_1,type(list_1))\nprint(tuple_1,type(tuple_1))\nprint(dict_1,type(dict_1))\nprint(set_1,type(set_1))\n```\n\n> 12.33 \n(2+7j) \nTrue \nfengfeng \n[] \n() \n{} \nset() \n\n\n## 不可变数据（3 个）：Number（数字）类型、String（字符串）、Tuple（元组）","#### What is a data type\n\nSimple understanding, containers for storing data\n\n> Data types are necessary attributes for each programming language. Only by assigning clear data types to data can computers process data. Therefore, it is necessary to use data types correctly. Data types are similar in different languages, but the specific expression methods vary\n\nThe following are commonly used data types for Python programming:\n\n- Number (number)\n- String (String)\n- List\n- Tuple\n- Set\n- Dictionary\n\nImmutable data (3 pieces): Number, String, Tuple\n\nvariable data   (3): List, Dictionary, Set\n\nYou can use the python built-in function type() function to view the data type\n\n```python\nint_1 = 12\nprint(int_1, type(int_1))\nfloat_1 = 12.33\nprint(float_1, type(float_1))\ncomplex_1 = 2 + 7j\nprint(complex_1, type(complex_1))\nbool_1=True\nprint(bool_1,type(bool_1))\nstr_1='fengfeng'\nprint(str_1,type(str_1))\nlist_1=[]\ntuple_1=()\ndict_1={}\nset_1=set()                          #Creating empty collections is a bit special\nprint(list_1,type(list_1))\nprint(tuple_1,type(tuple_1))\nprint(dict_1,type(dict_1))\nprint(set_1,type(set_1))\n```\n\n> 12.33 \n(2+7j) \nTrue \nfengfeng \n[] \n() \n{} \nset() \n\n\n## Immutable data (3 pieces): Number type, String, Tuple","python",0,"https:\u002F\u002Fblog4-1316398321.cos.ap-nanjing.myqcloud.com\u002Fblog5\u002F20250712012719__【哲风壁纸】桃花-花.png",[15],"Python",false,{"id":18,"title":19,"title_en":20},10,"Django部署","Django deployment",{"id":22,"title":23,"title_en":24},12,"深入了解 Go 语言协程","Deep Dive into Go Language Goroutines","2025-07-23T07:14:42+08:00"]