![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
SarahZhang0104
这个作者很懒,什么都没留下…
展开
-
终端执行python脚本 (for Mac)
cd 到文件夹目录 在文件首行添加#!/usr/bin/env python 添加权限 chmod 777 filename.py 执行脚本./filename.py原创 2017-10-27 15:55:22 · 1328 阅读 · 0 评论 -
python3中报错:TypeError: 'range' object doesn't support item deletion
通过range构造数组dataIndex = range(numSamples)在执行时del(dataIndex[randIndex])报错:TypeError: ‘range’ object doesn’t support item deletion 原因:python3中range不返回数组对象,而是返回range对象 解决方法:将数组对象转换为list类型dataIndex = list原创 2017-10-13 13:11:52 · 4286 阅读 · 0 评论 -
python os目录和文件相关操作
原 python os目录和文件相关操作 <div class="article-info-box"> <div class="article-bar-top d-flex">转载 2018-05-27 11:36:10 · 339 阅读 · 0 评论