python 基础 注释 数据类型
2021/9/4 1:05:52
本文主要是介绍python 基础 注释 数据类型,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
""" 数据类型 """ # int num1 = 1 # float num2 =1.1 print(type(num1)) print(type(num2)) # str ,字符串,特点:数据都带引号,单引、双引均可 a = 'hello world' print(type(a)) b=True # boolean print(type(b)) # list 列表 c = [10,20,30] print(type(c)) # tuple 元组 d = (10,20,30) print(type(d)) # set 集合 e = {10,20,30} print(type(e)) # dict 字典 键值对 f = {'name':'Tom','age': 16} print((type(f)))
这篇关于python 基础 注释 数据类型的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-09-18初探Python股票自动化交易:入门指南
- 2024-09-18Python量化入门:轻松掌握量化分析基础与实战
- 2024-09-18Python量化交易:入门指南与实践
- 2024-09-18Python量化交易:入门指南与实战技巧
- 2024-09-14Python人工智能项目实战:从零开始的实践指南
- 2024-09-14探索Python人工智能资料:初学者的指南
- 2024-09-14Python人工智能资料:初学者的全面指南
- 2024-09-13Matplotlib入门:轻松绘制Python数据可视化图表
- 2024-09-13Python人工智能:初学者的入门指南
- 2024-09-13Python人工智能:轻松入门与实践