python自动化测试-基础使用1
1.设置编码 setting--file and code templates
2.安装第三方库
1.1 pip install requests -i https://pypi.tuna.tsinghua.edu.cn/simple/
1.2 xxx.tar.gz rar zip
解压后拷贝到python安装目录下scripts下面,进入解压后的安装包里面有setup.打开cmd输入 python setup.py install安装
3.换行print('hello\nword')----->hello 换行符\n
word
print('''11111
2222''')成对的单引号保持内容的格式输出
4.注释 """xxx""" #单行注释 ctrl+/ ctrl+shift+/
5.多行语句 sum = 'one' \
'two' \
'three'
6.转义字符 r 字符串前面+r可以输入原始数据 r'\n'-------->\n

浙公网安备 33010602011771号