原创 寫了一個簡單的購物車

# 商品列表 shopping_list = [("apple",15),("iphone",8000),("water",30),("vivo",3000)] saving = input("請輸入整數金額:") # 引導用戶輸入金

原创 tao_bao.py

from selenium import webdriver from bs4 import BeautifulSoup import time import random driver = webdriver.Chrome() driv

原创 python第一週總結

Day_01總結 pycharm 中shift + F6 是更改選中的變量的名字 1常用的dos命令: cd 、cd.. 、cd/ 盤符: 切換根目錄 相對路徑:沒有盤符,找一個參照文件 絕對路徑:有盤符的路徑 2 Python是一種什麼

原创 clear_data.py

def clear_data():     """     將得到的數據進行清理。手機價格在2299到3299之間的信息     將信息保存到clear_phone_honor.txt中     :return: 無返回值     """

原创 # 從字符串中取出數字:string ="123ads23ffdk43lsdl66" 結果要的是:123、23、43、166

string ="123ads23ffdk43lsdl66" my_str = "" for i in string: if i.isdigit(): my_str += i else:

原创 price_payers_pie.py

from pyecharts import Pie data_dict = {} attr, v1 = [], [] clear_data_dict = {} clear_data_dict["其他"] = 0 # 打開txt文件,篩選出