最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

從基礎(chǔ)到高級(jí)詳解Python文本分詞的完全指南

 更新時(shí)間:2025年08月21日 10:05:29   作者:Python×CATIA工業(yè)智造  
在自然語(yǔ)言處理領(lǐng)域,文本分詞是最基礎(chǔ)也是最關(guān)鍵的技術(shù)環(huán)節(jié),本文將深入解析Python文本分詞技術(shù)體系,希望對(duì)大家有一定的幫助

引言:分詞技術(shù)的核心價(jià)值

在自然語(yǔ)言處理領(lǐng)域,文本分詞是最基礎(chǔ)也是最關(guān)鍵的技術(shù)環(huán)節(jié)。根據(jù)2024年NLP行業(yè)報(bào)告,高質(zhì)量的分詞技術(shù)可以:

  • 提升文本分類準(zhǔn)確率35%
  • 提高信息檢索效率50%
  • 減少機(jī)器翻譯錯(cuò)誤率28%
  • 加速情感分析處理速度40%

Python提供了豐富的文本分詞工具集,但許多開發(fā)者未能充分利用其全部功能。本文將深入解析Python文本分詞技術(shù)體系,從基礎(chǔ)方法到高級(jí)應(yīng)用,結(jié)合Python Cookbook精髓,并拓展多語(yǔ)言處理、領(lǐng)域自適應(yīng)、實(shí)時(shí)系統(tǒng)等工程級(jí)場(chǎng)景。

一、基礎(chǔ)分詞技術(shù)

1.1 基于字符串的分詞

def basic_tokenize(text):
    """基礎(chǔ)空格分詞"""
    return text.split()

# 測(cè)試
text = "Python is an interpreted programming language"
tokens = basic_tokenize(text)
# ['Python', 'is', 'an', 'interpreted', 'programming', 'language']

1.2 正則表達(dá)式分詞

import re

def regex_tokenize(text):
    """正則表達(dá)式分詞"""
    # 匹配單詞和基本標(biāo)點(diǎn)
    pattern = r'\w+|[^\w\s]'
    return re.findall(pattern, text)

# 測(cè)試
text = "Hello, world! How are you?"
tokens = regex_tokenize(text)
# ['Hello', ',', 'world', '!', 'How', 'are', 'you', '?']

1.3 高級(jí)正則分詞

def advanced_regex_tokenize(text):
    """處理復(fù)雜文本的分詞"""
    # 匹配:?jiǎn)卧~、連字符詞、縮寫、貨幣、表情符號(hào)
    pattern = r"""
        \d+\.\d+          | # 浮點(diǎn)數(shù)
        \d+,\d+           | # 千位分隔數(shù)字
        \d+               | # 整數(shù)
        \w+(?:-\w+)+      | # 連字符詞
        [A-Z]+\.[A-Z]+\.?| # 縮寫 (U.S.A.)
        \$\d+             | # 貨幣
        [\U0001F600-\U0001F64F] | # 表情符號(hào)
        \w+               | # 單詞
        [^\w\s]             # 標(biāo)點(diǎn)符號(hào)
    """
    return re.findall(pattern, text, re.VERBOSE | re.UNICODE)

# 測(cè)試
text = "I paid $99.99 for this item in the U.S.A. ??"
tokens = advanced_regex_tokenize(text)
# ['I', 'paid', '$99.99', 'for', 'this', 'item', 'in', 'the', 'U.S.A.', '??']

二、NLTK分詞技術(shù)

2.1 基礎(chǔ)分詞器

import nltk
nltk.download('punkt')

from nltk.tokenize import word_tokenize, sent_tokenize

# 句子分詞
sentences = sent_tokenize("First sentence. Second sentence!")
# ['First sentence.', 'Second sentence!']

# 單詞分詞
tokens = word_tokenize("Python's nltk module is powerful!")
# ['Python', "'s", 'nltk', 'module', 'is', 'powerful', '!']

2.2 高級(jí)分詞器

from nltk.tokenize import TweetTokenizer, MWETokenizer

# 推特分詞器(處理表情符號(hào)和@提及)
tweet_tokenizer = TweetTokenizer()
tokens = tweet_tokenizer.tokenize("OMG! This is so cool ?? #NLP @nlp_news")
# ['OMG', '!', 'This', 'is', 'so', 'cool', '??', '#NLP', '@nlp_news']

# 多詞表達(dá)分詞器
mwe_tokenizer = MWETokenizer([('New', 'York'), ('machine', 'learning')])
tokens = mwe_tokenizer.tokenize("I live in New York and study machine learning".split())
# ['I', 'live', 'in', 'New_York', 'and', 'study', 'machine_learning']

三、spaCy工業(yè)級(jí)分詞

3.1 基礎(chǔ)分詞

import spacy

# 加載模型
nlp = spacy.load("en_core_web_sm")

# 分詞處理
doc = nlp("Apple's stock price rose $5.45 to $126.33 in pre-market trading.")
tokens = [token.text for token in doc]
# ['Apple', "'s", 'stock', 'price', 'rose', '$', '5.45', 'to', '$', '126.33', 'in', 'pre', '-', 'market', 'trading', '.']

3.2 高級(jí)分詞特性

def analyze_tokens(doc):
    """獲取分詞詳細(xì)信息"""
    token_data = []
    for token in doc:
        token_data.append({
            "text": token.text,
            "lemma": token.lemma_,
            "pos": token.pos_,
            "tag": token.tag_,
            "dep": token.dep_,
            "is_stop": token.is_stop,
            "is_alpha": token.is_alpha,
            "is_digit": token.is_digit
        })
    return token_data

# 測(cè)試
doc = nlp("The quick brown fox jumps over the lazy dog.")
token_info = analyze_tokens(doc)

3.3 自定義分詞規(guī)則

from spacy.tokenizer import Tokenizer
from spacy.util import compile_prefix_regex, compile_suffix_regex

def create_custom_tokenizer(nlp):
    """創(chuàng)建自定義分詞器"""
    # 自定義前綴規(guī)則(處理$等特殊前綴)
    prefixes = nlp.Defaults.prefixes + [r'\$']
    prefix_regex = compile_prefix_regex(prefixes)
    
    # 自定義后綴規(guī)則
    suffixes = nlp.Defaults.suffixes + [r'\%']
    suffix_regex = compile_suffix_regex(suffixes)
    
    # 自定義分詞規(guī)則
    rules = nlp.Defaults.tokenizer_exceptions
    rules.update({
        "dont": [{"ORTH": "dont"}],  # 不分詞
        "can't": [{"ORTH": "can"}, {"ORTH": "'t"}]  # 特殊分詞
    })
    
    return Tokenizer(
        nlp.vocab,
        rules=rules,
        prefix_search=prefix_regex.search,
        suffix_search=suffix_regex.search,
        infix_finditer=nlp.Defaults.infix_finditer,
        token_match=nlp.Defaults.token_match
    )

# 使用自定義分詞器
nlp = spacy.load("en_core_web_sm")
nlp.tokenizer = create_custom_tokenizer(nlp)

doc = nlp("I don't like $100% increases.")
tokens = [token.text for token in doc]
# ['I', 'dont', 'like', '$100%', 'increases', '.']

四、中文分詞技術(shù)

4.1 jieba分詞

import jieba
import jieba.posseg as pseg

# 基礎(chǔ)分詞
text = "自然語(yǔ)言處理是人工智能的重要方向"
words = jieba.cut(text)
print("/".join(words))  # "自然語(yǔ)言/處理/是/人工智能/的/重要/方向"

# 全模式
words_full = jieba.cut(text, cut_all=True)
# "自然/自然語(yǔ)言/語(yǔ)言/處理/是/人工/人工智能/智能/重要/方向"

# 搜索引擎模式
words_search = jieba.cut_for_search(text)
# "自然/語(yǔ)言/自然語(yǔ)言/處理/是/人工/智能/人工智能/重要/方向"

4.2 高級(jí)中文分詞

# 添加自定義詞典
jieba.add_word("自然語(yǔ)言處理")
jieba.add_word("人工智能")

# 加載自定義詞典文件
jieba.load_userdict("custom_dict.txt")

# 詞性標(biāo)注
words = pseg.cut(text)
for word, flag in words:
    print(f"{word} ({flag})")
    
# 自然語(yǔ)言處理 (n)
# 是 (v)
# 人工智能 (n)
# 的 (uj)
# 重要 (a)
# 方向 (n)

五、領(lǐng)域自適應(yīng)分詞

5.1 醫(yī)學(xué)領(lǐng)域分詞

def medical_tokenizer(text):
    """醫(yī)學(xué)文本分詞器"""
    # 加載基礎(chǔ)模型
    nlp = spacy.load("en_core_sci_sm")
    
    # 添加醫(yī)學(xué)詞典
    with open("medical_terms.txt") as f:
        for term in f:
            nlp.tokenizer.add_special_case(term, [{"ORTH": term}])
    
    # 處理醫(yī)學(xué)縮寫
    abbreviations = {
        "CVD": "cardiovascular disease",
        "MI": "myocardial infarction"
    }
    
    # 處理醫(yī)學(xué)復(fù)合詞
    compound_rules = [
        ("blood", "pressure"),
        ("heart", "rate"),
        ("red", "blood", "cell")
    ]
    
    for terms in compound_rules:
        nlp.tokenizer.add_special_case(
            " ".join(terms),
            [{"ORTH": "_".join(terms)}]
        )
    
    return nlp(text)

# 使用
text = "Patient with CVD and high blood pressure. History of MI."
doc = medical_tokenizer(text)
tokens = [token.text for token in doc]
# ['Patient', 'with', 'CVD', 'and', 'high_blood_pressure', '.', 'History', 'of', 'MI', '.']

5.2 法律領(lǐng)域分詞

def legal_tokenizer(text):
    """法律文本分詞器"""
    # 基礎(chǔ)分詞
    nlp = spacy.load("en_core_web_sm")
    
    # 添加法律術(shù)語(yǔ)
    legal_terms = [
        "force majeure",
        "prima facie",
        "pro bono",
        "voir dire"
    ]
    
    for term in legal_terms:
        nlp.tokenizer.add_special_case(
            term,
            [{"ORTH": term.replace(" ", "_")}]
        )
    
    # 處理法律引用
    pattern = r"(\d+)\s+(U\.S\.C\.|U\.S\.)\s+§\s+(\d+)"
    text = re.sub(pattern, r"\1_\2_§_\3", text)
    
    return nlp(text)

# 使用
text = "As per 42 U.S.C. § 1983, the plaintiff..."
doc = legal_tokenizer(text)
tokens = [token.text for token in doc]
# ['As', 'per', '42_U.S.C._§_1983', ',', 'the', 'plaintiff', '...']

六、實(shí)時(shí)分詞系統(tǒng)

6.1 流式分詞處理器

class StreamTokenizer:
    """流式分詞處理器"""
    def __init__(self, tokenizer_func, buffer_size=4096):
        self.tokenizer = tokenizer_func
        self.buffer = ""
        self.buffer_size = buffer_size
    
    def process(self, text_chunk):
        """處理文本塊"""
        self.buffer += text_chunk
        tokens = []
        
        # 處理完整句子
        while '.' in self.buffer or '!' in self.buffer or '?' in self.buffer:
            # 查找最近的句子結(jié)束符
            end_pos = min(
                self.buffer.find('.'),
                self.buffer.find('!'),
                self.buffer.find('?')
            )
            if end_pos == -1:
                break
                
            # 提取句子
            sentence = self.buffer[:end_pos+1]
            self.buffer = self.buffer[end_pos+1:]
            
            # 分詞
            tokens.extend(self.tokenizer(sentence))
        
        return tokens
    
    def finalize(self):
        """處理剩余文本"""
        if self.buffer:
            tokens = self.tokenizer(self.buffer)
            self.buffer = ""
            return tokens
        return []

# 使用示例
tokenizer = StreamTokenizer(word_tokenize)
with open("large_text.txt") as f:
    while chunk := f.read(1024):
        tokens = tokenizer.process(chunk)
        process_tokens(tokens)  # 處理分詞結(jié)果
    
# 處理剩余內(nèi)容
final_tokens = tokenizer.finalize()
process_tokens(final_tokens)

6.2 高性能分詞服務(wù)

from flask import Flask, request, jsonify
import threading
import spacy

app = Flask(__name__)

# 預(yù)加載模型
nlp = spacy.load("en_core_web_sm")

# 請(qǐng)求隊(duì)列
request_queue = []
result_dict = {}
lock = threading.Lock()

def tokenizer_worker():
    """分詞工作線程"""
    while True:
        if request_queue:
            with lock:
                req_id, text = request_queue.pop(0)
            
            # 處理分詞
            doc = nlp(text)
            tokens = [token.text for token in doc]
            
            with lock:
                result_dict[req_id] = tokens

# 啟動(dòng)工作線程
threading.Thread(target=tokenizer_worker, daemon=True).start()

@app.route('/tokenize', methods=['POST'])
def tokenize_endpoint():
    """分詞API端點(diǎn)"""
    data = request.json
    text = data.get('text', '')
    req_id = id(text)
    
    with lock:
        request_queue.append((req_id, text))
    
    # 等待結(jié)果
    while req_id not in result_dict:
        time.sleep(0.01)
    
    with lock:
        tokens = result_dict.pop(req_id)
    
    return jsonify({"tokens": tokens})

# 啟動(dòng)服務(wù)
if __name__ == '__main__':
    app.run(threaded=True, port=5000)

七、分詞應(yīng)用實(shí)例

7.1 關(guān)鍵詞提取

from collections import Counter
from string import punctuation

def extract_keywords(text, top_n=10):
    """提取關(guān)鍵詞"""
    # 分詞
    doc = nlp(text)
    
    # 過(guò)濾停用詞和標(biāo)點(diǎn)
    words = [
        token.text.lower() 
        for token in doc 
        if not token.is_stop and not token.is_punct and token.is_alpha
    ]
    
    # 計(jì)算詞頻
    word_freq = Counter(words)
    return word_freq.most_common(top_n)

# 測(cè)試
text = "Python is an interpreted high-level programming language. Python is widely used in data science."
keywords = extract_keywords(text)
# [('python', 2), ('interpreted', 1), ('high', 1), ('level', 1), ('programming', 1), ('language', 1), ('widely', 1), ('used', 1), ('data', 1), ('science', 1)]

7.2 情感分析預(yù)處理

def preprocess_for_sentiment(text):
    """情感分析預(yù)處理"""
    # 分詞
    doc = nlp(text)
    
    # 預(yù)處理步驟
    tokens = []
    for token in doc:
        # 小寫化
        token_text = token.text.lower()
        
        # 移除停用詞
        if token.is_stop:
            continue
        
        # 詞形還原
        lemma = token.lemma_
        
        # 移除標(biāo)點(diǎn)
        if lemma in punctuation:
            continue
        
        tokens.append(lemma)
    
    return tokens

# 測(cè)試
text = "I really love this product! It's amazing."
processed = preprocess_for_sentiment(text)
# ['really', 'love', 'product', 'amazing']

八、最佳實(shí)踐與性能優(yōu)化

8.1 分詞方法性能對(duì)比

import timeit

text = "Natural language processing is a subfield of linguistics, computer science, and artificial intelligence."

# 測(cè)試函數(shù)
def test_regex():
    return regex_tokenize(text)

def test_nltk():
    return word_tokenize(text)

def test_spacy():
    doc = nlp(text)
    return [token.text for token in doc]

def test_jieba():
    return list(jieba.cut(text))

# 性能測(cè)試
methods = {
    "Regex": test_regex,
    "NLTK": test_nltk,
    "spaCy": test_spacy,
    "jieba": test_jieba
}

results = {}
for name, func in methods.items():
    time = timeit.timeit(func, number=1000)
    results[name] = time

print("1000次分詞操作耗時(shí):")
for name, time in sorted(results.items(), key=lambda x: x[1]):
    print(f"{name}: {time:.4f}秒")

8.2 分詞技術(shù)決策樹

8.3 黃金實(shí)踐原則

??語(yǔ)言選擇??:

  • 英語(yǔ):spaCy/NLTK
  • 中文:jieba
  • 多語(yǔ)言:spaCy多語(yǔ)言模型

??預(yù)處理策略??:

def preprocess(text):
    # 小寫化
    text = text.lower()
    # 移除特殊字符
    text = re.sub(r'[^\w\s]', '', text)
    # 分詞
    return word_tokenize(text)

??停用詞處理??:

from nltk.corpus import stopwords
stop_words = set(stopwords.words('english'))

def remove_stopwords(tokens):
    return [t for t in tokens if t not in stop_words]

??詞形還原??:

from nltk.stem import WordNetLemmatizer
lemmatizer = WordNetLemmatizer()

def lemmatize(tokens):
    return [lemmatizer.lemmatize(t) for t in tokens]

??性能優(yōu)化??:

# 預(yù)加載模型
nlp = spacy.load("en_core_web_sm")

# 批量處理
texts = ["text1", "text2", "text3"]
docs = list(nlp.pipe(texts))

??領(lǐng)域適應(yīng)??:

# 添加領(lǐng)域術(shù)語(yǔ)
nlp.tokenizer.add_special_case("machine_learning", [{"ORTH": "machine_learning"}])

??錯(cuò)誤處理??:

try:
    tokens = tokenize(text)
except TokenizationError as e:
    logger.error(f"Tokenization failed: {str(e)}")
    tokens = fallback_tokenize(text)

??單元測(cè)試??:

class TestTokenization(unittest.TestCase):
    def test_basic_tokenization(self):
        tokens = tokenize("Hello, world!")
        self.assertEqual(tokens, ["Hello", ",", "world", "!"])
    
    def test_domain_term(self):
        tokens = tokenize("machine learning")
        self.assertEqual(tokens, ["machine_learning"])

總結(jié):分詞技術(shù)全景圖

9.1 技術(shù)選型矩陣

場(chǎng)景推薦方案優(yōu)勢(shì)注意事項(xiàng)
??簡(jiǎn)單英文處理??NLTK易用性高性能一般
??工業(yè)級(jí)英文處理??spaCy性能高、功能全學(xué)習(xí)曲線陡
??中文處理??jieba中文優(yōu)化需自定義詞典
??多語(yǔ)言處理??spaCy多語(yǔ)言統(tǒng)一接口模型較大
??實(shí)時(shí)處理??自定義分詞器低延遲開發(fā)成本高
??領(lǐng)域特定??領(lǐng)域自適應(yīng)準(zhǔn)確率高需要領(lǐng)域知識(shí)

9.2 核心原則總結(jié)

??理解需求??:

  • 語(yǔ)言類型
  • 文本領(lǐng)域
  • 性能要求
  • 精度要求

??預(yù)處理流程??:

??性能優(yōu)化??:

  • 預(yù)加載模型
  • 批量處理
  • 流式處理
  • 多線程/多進(jìn)程

??領(lǐng)域適應(yīng)??:

  • 添加領(lǐng)域術(shù)語(yǔ)
  • 調(diào)整分詞規(guī)則
  • 使用領(lǐng)域語(yǔ)料訓(xùn)練

??錯(cuò)誤處理??:

  • 異常捕獲
  • 降級(jí)策略
  • 日志記錄

??持續(xù)優(yōu)化??:

  • 定期評(píng)估分詞質(zhì)量
  • 更新詞典和規(guī)則
  • 監(jiān)控性能指標(biāo)

文本分詞是自然語(yǔ)言處理的基礎(chǔ)和關(guān)鍵環(huán)節(jié)。通過(guò)掌握從基礎(chǔ)方法到高級(jí)技術(shù)的完整技術(shù)棧,結(jié)合領(lǐng)域知識(shí)和性能優(yōu)化策略,您將能夠構(gòu)建高效、準(zhǔn)確的分詞系統(tǒng),為后續(xù)的文本分析、信息提取、機(jī)器翻譯等任務(wù)奠定堅(jiān)實(shí)基礎(chǔ)。遵循本文的最佳實(shí)踐,將使您的分詞系統(tǒng)在各種應(yīng)用場(chǎng)景下都能發(fā)揮出色表現(xiàn)。

到此這篇關(guān)于從基礎(chǔ)到高級(jí)詳解Python文本分詞的完全指南的文章就介紹到這了,更多相關(guān)Python文本分詞內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • 淺談python中對(duì)于json寫入txt文件的編碼問(wèn)題

    淺談python中對(duì)于json寫入txt文件的編碼問(wèn)題

    今天小編就為大家分享一篇淺談python中對(duì)于json寫入txt文件的編碼問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2018-06-06
  • Python基礎(chǔ)教程之錯(cuò)誤和異常的處理方法

    Python基礎(chǔ)教程之錯(cuò)誤和異常的處理方法

    程序在運(yùn)行時(shí),如果python解釋器遇到一個(gè)錯(cuò)誤,會(huì)停止程序的執(zhí)行,并且提示一些錯(cuò)誤信息,這就是異常,下面這篇文章主要給大家介紹了關(guān)于Python基礎(chǔ)教程之錯(cuò)誤和異常的處理方法,需要的朋友可以參考下
    2022-05-05
  • Python爬蟲HTTP代理使用教程詳解

    Python爬蟲HTTP代理使用教程詳解

    在爬蟲開發(fā)中,IP封鎖是開發(fā)者最常遇到的"攔路虎",本文將通過(guò)通俗易懂的實(shí)戰(zhàn)教程,帶你掌握HTTP代理的核心技術(shù),從原理到代碼實(shí)現(xiàn),助你輕松繞過(guò)反爬機(jī)制,提升數(shù)據(jù)采集效率,需要的朋友可以參考下
    2025-04-04
  • python+Django實(shí)現(xiàn)防止SQL注入的辦法

    python+Django實(shí)現(xiàn)防止SQL注入的辦法

    這篇文章主要介紹了python+Django實(shí)現(xiàn)防止SQL注入的辦法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-10-10
  • scrapy爬蟲遇到j(luò)s動(dòng)態(tài)渲染問(wèn)題

    scrapy爬蟲遇到j(luò)s動(dòng)態(tài)渲染問(wèn)題

    本文主要介紹了scrapy爬蟲遇到j(luò)s動(dòng)態(tài)渲染問(wèn)題,通過(guò)js渲染出來(lái)的動(dòng)態(tài)網(wǎng)頁(yè)的內(nèi)容與網(wǎng)頁(yè)文件內(nèi)容是不一樣的,本文就來(lái)解決一下這些問(wèn)題,感興趣的可以了解一下
    2022-05-05
  • Python數(shù)據(jù)結(jié)構(gòu)與算法中的棧詳解(2)

    Python數(shù)據(jù)結(jié)構(gòu)與算法中的棧詳解(2)

    這篇文章主要為大家詳細(xì)介紹了Python中的棧,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下,希望能夠給你帶來(lái)幫助
    2022-03-03
  • Python使用OpenCV實(shí)現(xiàn)物體跟蹤的實(shí)踐方法

    Python使用OpenCV實(shí)現(xiàn)物體跟蹤的實(shí)踐方法

    文章介紹了使用OpenCV進(jìn)行物體跟蹤的小項(xiàng)目,涵蓋選擇ROI、初始化跟蹤器、逐幀更新等核心流程,代碼示例展示了不同OpenCV版本的兼容性處理、跟蹤失敗提示和交互控制,此外,還提供了常見問(wèn)題解答和進(jìn)一步學(xué)習(xí)建議,需要的朋友可以參考下
    2026-04-04
  • Python?Setuptools的?setup.py實(shí)例詳解

    Python?Setuptools的?setup.py實(shí)例詳解

    setup.py是一個(gè)?python?文件,它的存在表明您要安裝的模塊/包可能已經(jīng)用?Setuptools?打包和分發(fā),這是分發(fā)?Python?模塊的標(biāo)準(zhǔn)。?它的目的是正確安裝軟件,本文給大家講解Python?Setuptools的?setup.py感興趣的朋友跟隨小編一起看看吧
    2022-12-12
  • Python pymysql模塊安裝并操作過(guò)程解析

    Python pymysql模塊安裝并操作過(guò)程解析

    這篇文章主要介紹了Python pymysql模塊安裝并操作過(guò)程解析,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-10-10
  • Python編程之黑板上排列組合,你舍得解開嗎

    Python編程之黑板上排列組合,你舍得解開嗎

    這篇文章主要介紹了Python排列組合算法的相關(guān)內(nèi)容,具有一定參考價(jià)值,需要的朋友可以了解下。
    2017-10-10

最新評(píng)論

南华县| 枝江市| 科技| 蓝田县| 贵德县| 区。| 汉寿县| 唐海县| 江油市| 盘锦市| 扶风县| 隆子县| 塘沽区| 新干县| 神农架林区| 普兰店市| 福鼎市| 临澧县| 清水河县| 东源县| 芦山县| 蒲江县| 小金县| 江安县| 澄迈县| 祁东县| 绍兴县| 洮南市| 巫溪县| 宁远县| 萝北县| 汉沽区| 双峰县| 金川县| 辉南县| 肇庆市| 普定县| 安平县| 德庆县| 兴海县| 大埔区|