1、IDLE中如何执行执行之前操作过的代码?
alt+p
2、python自带编辑器的缩进和取消缩进快捷键:
整体缩进:Ctrl+【 或 Tab 整体取消缩进:Ctrl+】
3、pycharm编辑器的缩进和取消缩进快捷键:
整体缩进:tab 整体取消缩进:tab+shift
4、python中dir()和help()的使用:
- dir():列出指定类或模块包含的全部内容(包括函数、方法、类、变量等)。
- help():查看某个函数或方法的帮助文档。
https://www.cnblogs.com/fireporsche/p/9441848.html
5、 转义字符
6、 换行问题:
# print()默认是打印完字符串会自动添加一个换行符,end=" "参数告诉print()用空格代替换行
while None :
print('进入循环')
print('退出循环')
print('I love fishc');print('very much!')
print("hello LQC",end='')
print("hello LL",end="")
print("hello LZ")
7、 IDLE清屏问题
https://zhuanlan.zhihu.com/p/32825486
8、Python数值类型
整型、浮点型、布尔类型、e记忆法;
类型转换函数:
如何获取类型:
1、type()
2、isinstance()
9、优先级问题:
注意:
(1)-3**2 等于 -(3**2)=9
(2)3**-2 等于 3**(-2)=0.1111111111
10、Python IDLE入门
https://www.cnblogs.com/dsky/archive/2012/06/04/2535397.html