python 基础数据结构

https://blog.csdn.net/lilongsy/article/details/70895753

python列表删除元素

  1. 采用del语句 删除指定位置元素 del a[1]
  2. 采用列表remove方法 删除指定元素 a.remove(1)

python的除法

  • python2和python3中的除法规则不一样 巨坑 坑了我i两个小时才发现!!!
  • python3中精确除法是/
  • 向上取整除法是//
  • 取余数是%

python assert 用法

  • assert 用来帮你调试时减少调试步骤 直接定位错误发生的地方
  • assert a==1,"a是一个等于#1的值"

python 判断两array相等


(a==b).all()
posted @ 2019-08-04 15:26  FromZeroToOne  阅读(179)  评论(0编辑  收藏  举报