調(diào)用模塊語法:import 模塊from 模塊 import 方法 1.random 模塊(1)產(chǎn)生指定范圍內(nèi)的隨機數(shù)import random...
from selenium import webdriverdr = webdrover.Chrome()dr.get('https://www...
安裝selenium包:cmd > pip install selenium安裝與瀏覽器相匹配的瀏覽器驅(qū)動導(dǎo)包:from selenium im...
1.自定義函數(shù)(1)無參函數(shù)def 參數(shù)名():函數(shù)體返回值 def a():b = 1c = 2print(b)return(b+c)a()p...
集合(set)是一個無序的不重復(fù)元素序列凭疮。定義一個空集合a = set()b = {1,2,3}c = {}print(type(a))prin...
語法:dict = {key1:value1,key2:value2,key3:value3......}dict1 = {'name':'小明...
1.if條件判斷語句語法:if 條件:執(zhí)行語句elif 條件:執(zhí)行語句...else:執(zhí)行語句 猜字游戲從鍵盤輸入一個數(shù)字店茶,對比指定數(shù)字大小是否...
1.賦值a = 1print(id(a))b = aprint(id(b))a = 2print(id(a))print(id(b))輸出結(jié)果為...
1.元組的定義元組用()登下,有序卓练,不可修改娶视。例如:a = (1,2,3,4,5)print(a)定義一個空元組晒哄。b = ()print(type(...