七秒鱼记忆~
每天进步一点点!!!
摘要: #函数的定义 # def 函数名(): # 语句块 #函数的调用 # 函数名() 使用函数名直接调用 #函数的参数 #当函数含有参数时,需要在函数括号内填写参数,多个参数用逗号分割;定义函数使用的参数为形参 #调用带有参数的函数时,需在调用时填写对应的参数,多个参数用逗号分割;调用函数使用的参数为实 阅读全文
posted @ 2021-04-16 16:42 fishing~ 阅读(58) 评论(0) 推荐(0) 编辑
摘要: #for循环语法 # for 变量 in 集合: # 循环体 #else: # 循环中没有用break退出,循环结束后,继续执行 my_list =['a','b','c','d'] for i in my_list: #i =my_list[0] print(i,end=' ') #使用end,控 阅读全文
posted @ 2021-04-14 18:05 fishing~ 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #if语句用法 #适用场景:如果满足某某条件,就执行下面的操作 # if 判断条件: # 执行语句 a =int(input("请输入一个整数:")) if a==18: print("判断a等于18") #适用场景:如果满足某某条件,就执行操作;否则,剩余的操作 # if 判断条件: # 执行语句 阅读全文
posted @ 2021-04-14 11:38 fishing~ 阅读(53) 评论(0) 推荐(0) 编辑
摘要: #元组不可变类型,不可修改;元组的的不可变是相对的,如果元组中的某个元素是可变类型,则可修改该类型中的元素 my_tuple =('ksg','ytg','ttg',['ag','qg','dyg']) my_tuple[3][0]="ts" print(my_tuple) #元组解包 a,b,*c 阅读全文
posted @ 2021-04-14 10:24 fishing~ 阅读(47) 评论(0) 推荐(0) 编辑
摘要: #字典中的key值,不可变类型,且唯一 my_dict ={"name":"xiaoxiao","age":18,"hobby":"study","food":"latiao"} #获取某个元素 print(my_dict["name"]) #获取长度 print(len(my_dict)) #添加 阅读全文
posted @ 2021-04-14 10:13 fishing~ 阅读(33) 评论(0) 推荐(0) 编辑
摘要: #列表可变数据类型,可修改 my_list =['ksg','ytg','ttg',['ag','qg','dyg']] #添加 my_list.append('edg') #一次只能添加一个,追加到末尾 my_list.extend(['ts','we']) #添加多个 my_list.inser 阅读全文
posted @ 2021-04-14 10:12 fishing~ 阅读(37) 评论(0) 推荐(0) 编辑
摘要: my_str ="abcde" new_str ="123456" #字符串拼接 #方式一: splice_str =my_str + new_str print(splice_str) #方式二: new_splice =','.join([my_str,new_str]) print(new_s 阅读全文
posted @ 2021-04-13 15:09 fishing~ 阅读(50) 评论(0) 推荐(0) 编辑
摘要: #方式一 # from pywinauto import Desktop # app = Desktop() # dialog = app['打开'] # dialog["Edit"].type_keys(r"D:\appium.txt") # dialog["Button"].click() #方 阅读全文
posted @ 2021-04-13 10:22 fishing~ 阅读(39) 评论(0) 推荐(0) 编辑
摘要: import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from 阅读全文
posted @ 2021-04-09 14:53 fishing~ 阅读(37) 评论(0) 推荐(0) 编辑
摘要: import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from 阅读全文
posted @ 2021-04-09 14:51 fishing~ 阅读(25) 评论(0) 推荐(0) 编辑