官方文档

​https://numpy.org/doc/stable/​

for循环

0到9循环:

for i in range(10) :

在交互式环境中(如命令行形式)后面要多打一个回车才开始运行

阶乘

10!

from math import *
factorial(10)

输出

输出为科学计数法

print("%e" %111)
x = 111
print("%e" %x)
print("%e" %(111 + 111))

不打印换行符

print('hello', end='')

其他

​numpy矩阵操作​​​​Python assert 断言函数​​​​Python ASCII码与字符的相互转换​​​​vim 空格转tab,2空格缩进转4空格​