上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: list_dict_all = [] #创建一个空列表,全局变量,用来存放字典def AddtoDict(str_1): # 定义一个函数,功能:把文件里面的内容添加到字典中 list_str1 = str_1.split(",") # 读取的行内容以字符串的形式显示出来, 使用‘,’分隔字符串 l 阅读全文
posted @ 2018-07-04 11:04 薏米* 阅读(16218) 评论(0) 推荐(0)
摘要: # strip() 返回数据类型为字符串# strip()去除头和尾的指定字符;# 如果没有指定,默认去掉头和尾的空格 str_1 = " he llo " # he lloprint(str_1.strip())str_2 = ",,,,,,,he,l,lo,,,,,,," # 返回 he,l,l 阅读全文
posted @ 2018-07-03 17:01 薏米* 阅读(426) 评论(0) 推荐(0)
摘要: Windows系统下,这种情况发生在读取文件,再写入过程中出现。 原因是读完文件后python不知道当前文件位置在哪里。 方法一是:在关闭文件前只做读或者写一种操作。 方法二是:在写入文件前使用file.seek()函数,指定插入/读取文本的位置 一点的方法是在写入文件前用fseek(),或者fse 阅读全文
posted @ 2018-07-03 16:38 薏米* 阅读(4347) 评论(0) 推荐(0)
摘要: 目录处理 OS目录处理目录-->路径,文件夹 文件:html 1. 新建和删除一个目录import os #引入os目录from xx import xxos.mkdir("D:\\PycharmProjects\\RobotFramework\\vda_pakage\\Learning\\pyth 阅读全文
posted @ 2018-07-03 14:21 薏米* 阅读(298) 评论(0) 推荐(0)
摘要: Configure Git for the first time: git config --global user.name "xxxxx xx"git config --global user.email "xxxxx@xxxxx" git config --global color.ui tr 阅读全文
posted @ 2018-07-03 11:20 薏米* 阅读(291) 评论(0) 推荐(0)
摘要: 把range生成的整数序列里面的值一个一个的读出来 请把它写成函数,完成1-100的累加计算1.读懂题目,选取一组数据,用零散的代码完成你的功能2.变成函数 def 函数名(): 把零散的代码变成他的函数体3.想办法提高函数的复用性def sum_1(): sum = 0 for i in rang 阅读全文
posted @ 2018-06-30 23:01 薏米* 阅读(194) 评论(0) 推荐(0)
摘要: 通过ISO镜像安装完ubuntu 系统后,我们不能直接使用putty或其他远程工具通过SSH方式连接到linux系统 原因: linux 系统上没有安装远程工具openssh-server 解决方法: 安装远程工具: sudo apt-get install openssh-server 重启SSH 阅读全文
posted @ 2018-06-29 17:29 薏米* 阅读(1215) 评论(0) 推荐(0)
摘要: 解决方法:安装cifs-utils Ubuntu: sudo apt-get install cifs-utils RHEL/Cenos: yum install cifs-utils 阅读全文
posted @ 2018-06-29 15:39 薏米* 阅读(302) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2018-06-25 22:01 薏米* 阅读(12) 评论(0) 推荐(0)
摘要: 命名的规则: project name package name python file name 1. 不能以数字开头,不能使用中文 2. 不能使用关键字 3. 英文 字母 test_06_23 4. 数字 字母 下划线构成(不能以数字开头) 5. 见名知意 age 变量: x = 1 #定义一个 阅读全文
posted @ 2018-06-23 13:19 薏米* 阅读(141) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页