摘要: list: 增:list.append("str") 追加str到list最后 插入:list.insert(num,"str") 在list的num位置插入str 修改:list[num] = "str" 把list的第num位置改为str 把另一个列表元素添加进来: list.extend(li 阅读全文
posted @ 2020-01-23 20:38 火狐python 阅读(202) 评论(0) 推荐(0)
摘要: 1.linux中需要执行的py文件第一行加入 #! /usr/bin/env python ,以指定python解释器2.用python2作为解释器可以在py文件头部可以添加# -*- coding:utf-8 -*- 来指定采用utf-8文件编码以支持中文,python3不用添加,天然支持中文3. 阅读全文
posted @ 2020-01-23 20:37 火狐python 阅读(242) 评论(0) 推荐(0)