python入门(五):切片列表元祖字典
摘要:1.切片 针对序列,使用切片可以获得我们想要的内容 序列:字符串、列表、元祖 特点:可以使用坐标获取某一个值.坐标是从0开始算 >>> s="0123456789" >>> print(s[0]) #坐标是从0开始算 0 >>> print(s[9]) 9 >>> s=[0,1,2,3,4,5] >
阅读全文
python入门(四):字符串、编码、random
摘要:1.字符串 字符串基本有两种类型,str和bytes >>> s="a" >>> type(s) <class 'str'> #字符串 -- > Unicode(日常编程中的内容使用的是这个) >>> s="中国" >>> s.encode("utf-8") b'\xe4\xb8\xad\xe5\x
阅读全文
HttpRunnerManager安装部署
摘要:uname -a cat /etc/redhat-release 1、安装docker、mysql、rabbitmq sudo yum update curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh su
阅读全文
python入门(三):循环
摘要:1.for i in xxx xxx: 序列(列表,元祖,字符串) xxx: 可迭代对象 >>> for i in "abc": ... print(i) #对字符串做了一次遍历 ... # i是变量,也可以用别的字符 a b c 第一次:取a存到i里面,然后执行for的代码块 第一次:取b存到i里
阅读全文
python入门(二):isinstance、内置函数、常用运算等
摘要:1. isinstance(变量名,类型) #判断什么类型 ps: 只支持输入两个参数,输入3个参数会报错 >>> isinstance (a,int,float) Traceack (most recent call last): File "<stdin>", line 1, in <modul
阅读全文