鹤城
-
python爬虫学习——元组,字典
元组 ”’ tup1 = () #创建一个空的元组 print(type(tup1)) #tup2 = (50) #不是元组,python把括号当成了表达式的一部分,即数学运算的括号 #tup2 = (50,) tup2 = (50,60,70) print(type(tup2)) ”’ ”’ tup1 = (“abc”,”def”,2020,2023…
元组 ”’ tup1 = () #创建一个空的元组 print(type(tup1)) #tup2 = (50) #不是元组,python把括号当成了表达式的一部分,即数学运算的括号 #tup2 = (50,) tup2 = (50,60,70) print(type(tup2)) ”’ ”’ tup1 = (“abc”,”def”,2020,2023…