A
AcademicNovice
V1
2023/05/25阅读:19主题:默认主题
Python笔记
python的下载安装
www.python.org
www.JetBrains.com
pycharm 快捷键
ctrl+d 复制当前行代码
shift+alt+↑/↓ 将当前行代码上/下移 ctrl+shift+f10 运行当前代码文件
第一章 Python基础
python常用的数据类型
类型
|
描述 | 说明 |
---|---|---|
number | int float complex bool |
整数 浮点数 复数 布尔 |
string | 文本数据类型 | 字符串 |
list | 有序的可变序列 | 列表 |
Tuple |
有序的不可变序列
|
元组 |
Set | 无序的不重复集合 | 集合 |
Dictionary | 无序Key-Value集合 | 字典 |
pytheon的注释
# 单行代码注释
""" """ 或 ''' ''' 多行代码注释
type()函数
#type()获取变量或常量的类型信息
str = "hello python"
num = 2023
print(type(str), type(num), type(5.25))
#<class 'str'> <class 'int'> <class 'float'>
作者介绍
A
AcademicNovice
V1