欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

python?pygame實(shí)現(xiàn)五子棋雙人聯(lián)機(jī)

 更新時(shí)間:2022年05月04日 11:22:16   作者:-小黃怪-  
這篇文章主要為大家詳細(xì)介紹了python?pygame實(shí)現(xiàn)五子棋雙人聯(lián)機(jī),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了python pygame實(shí)現(xiàn)五子棋雙人聯(lián)機(jī)的具體代碼,供大家參考,具體內(nèi)容如下

同一局域網(wǎng)內(nèi),服務(wù)端開(kāi)啟時(shí),另一機(jī)器將IP地址HOST改為服務(wù)端對(duì)應(yīng)的IP地址、端口號(hào)與服務(wù)端的保持一致即可實(shí)現(xiàn)雙人聯(lián)機(jī)。(IP地址查詢(xún)方式:菜單欄輸入cmd,cmd窗口輸入ipconfig找到無(wú)線網(wǎng)絡(luò)下的IPv4地址)

服務(wù)端:

# -*- coding: utf-8 -*-
"""
Created on Tue Jun ?8 14:03:09 2021

@author: Administrator
"""
import pygame
import sys
from pygame.locals import *
from collections import Counter
from socket import *
from time import ctime
import json
import select
import socket

#界面初始化
screen=pygame.display.set_mode((400,450))
pygame.display.set_caption('五子棋')
pygame.init()

#圖片導(dǎo)入
img_board=pygame.image.load('F:/images/五子棋/chess_board.png')
img_bchess=pygame.image.load('F:/images/五子棋/black_chess.jpg')
img_wchess=pygame.image.load('F:/images/五子棋/white_chess.jpg')

#顏色
white=(255,255,255)
black=(0,0,0)

#用于傳送的數(shù)據(jù)
msg=[]

#棋盤(pán)定義
chess_board=[[]]
def set_chess_board():
? ? x,y=0,0
? ? while True:
? ? ? ? if x==400:
? ? ? ? ? ? x=0
? ? ? ? ? ? y+=40
? ? ? ? ? ? if y<400:
? ? ? ? ? ? ? ? chess_board.append([])
? ? ? ? if y==400:
? ? ? ? ? ? break
? ? ? ? chess_board[-1].append([x,y])
? ? ? ? x+=40
set_chess_board()

#棋盤(pán)格子是否落子
chess_exist=[[0 for i in range(10)]for j in range(10)]
#黑白棋子初始化
black_chess,white_chess=[],[]
#棋子類(lèi)型
chess_kind=1 ? ?#1為黑棋,0為白棋
wcx,wcy,bcx,bcy=[],[],[],[] ? #white_chess_x

def draw_board():
? ? for i in chess_board:
? ? ? ? for j in i:
? ? ? ? ? ? screen.blit(img_board,(j[0],j[1]))
? ? ? ? ? ? pygame.display.update()

#默認(rèn)棋子類(lèi)型為1
def set_chess():
? ? if event.type==MOUSEBUTTONDOWN:
? ? ? ? pos=pygame.mouse.get_pos()
? ? ? ? for i in range(len(chess_board)):
? ? ? ? ? ? for j in range(len(chess_board[i])):
? ? ? ? ? ? ? ? if chess_board[i][j][0]<pos[0]<chess_board[i][j][0]+40 and chess_board[i][j][1]<pos[1]<chess_board[i][j][1]+40:
? ? ? ? ? ? ? ? ? ? if chess_exist[i][j]==0:
? ? ? ? ? ? ? ? ? ? ? ? black_chess.append([i,j])
? ? ? ? ? ? ? ? ? ? ? ? bcx.append(black_chess[-1][0])
? ? ? ? ? ? ? ? ? ? ? ? bcy.append(black_chess[-1][1])
? ? ? ? ? ? ? ? ? ? ? ? msg.extend((i,j))
? ? ? ? ? ? ? ? ? ? ? ? chess_exist[i][j]=1
? ? ? ? ? ? ? ? ? ? ? ? pygame.display.update()
? ? ? ? ? ? ? ? ? ? ? ? return 1

def draw_chess():
? ? for i in white_chess:
? ? ? ? screen.blit(img_wchess,(i[1]*40,i[0]*40))
? ? for i in black_chess:
? ? ? ? screen.blit(img_bchess,(i[1]*40,i[0]*40))
? ? pygame.display.update()

def row_column_win(x,m,n,chess):
? ? for i in x:
? ? ? ? if x[i]>=5:
? ? ? ? ? ? xy=[]
? ? ? ? ? ? for j in chess:
? ? ? ? ? ? ? ? if j[m]==i:
? ? ? ? ? ? ? ? ? ? xy.append(j[n])
? ? ? ? ? ? xy.sort()
? ? ? ? ? ? count=0
? ? ? ? ? ? for j in range(len(xy)-1):
? ? ? ? ? ? ? ? if xy[j]+1==xy[j+1]:
? ? ? ? ? ? ? ? ? ? count+=1
? ? ? ? ? ? ? ? else:
? ? ? ? ? ? ? ? ? ? count=0
? ? ? ? ? ? if count>=4:
? ? ? ? ? ? ? ? return 1

def xiejiao_win(chess):
? ? x,y=[],[]
? ? chess.sort()
? ? for i in chess:
? ? ? ? x.append(i[0])
? ? ? ? y.append(i[1])
? ? c,first,last=0,0,0
? ? for i in range(len(x)-1):
? ? ? ? if x[i+1]!=x[i]:
? ? ? ? ? ? if x[i]+1==x[i+1]:
? ? ? ? ? ? ? ? c+=1
? ? ? ? ? ? ? ? last=i+1
? ? ? ? ? ? else:
? ? ? ? ? ? ? ? if c<4:
? ? ? ? ? ? ? ? ? ? first=i+1
? ? ? ? ? ? ? ? ? ? c=0
? ? ? ? ? ? ? ? else:
? ? ? ? ? ? ? ? ? ? last=i
? ? ? ? ? ? ? ? ? ? print(last)
? ? ? ? ? ? ? ? ? ? break
? ? ? ? else:
? ? ? ? ? ? last=i+1
? ? if c>=4:
? ? ? ? dis=[]
? ? ? ? for i in range(first,last+1):
? ? ? ? ? ? dis.append(x[i]-y[i])
? ? ? ? count=Counter(dis)
? ? ? ? for i in count:
? ? ? ? ? ? if count[i]>=5:
? ? ? ? ? ? ? ? return 1
? ? ? ? dis=[]
? ? ? ? x2=[i*(-1) for i in x]
? ? ? ? for i in range(first,last+1):
? ? ? ? ? ? dis.append(x2[i]-y[i])
? ? ? ? count=Counter(dis)
? ? ? ? for i in count:
? ? ? ? ? ? if count[i]>=5:
? ? ? ? ? ? ? ? return 1

def gameover():
? ? wcx_count,wcy_count,bcx_count,bcy_count=Counter(wcx),Counter(wcy),Counter(bcx),Counter(bcy)
? ? if row_column_win(wcx_count,0,1,white_chess)==1:
? ? ? ? return 0
? ? elif row_column_win(bcx_count,0,1,black_chess)==1:
? ? ? ? return 1
? ? elif row_column_win(wcy_count,1,0,white_chess)==1:
? ? ? ? return 0
? ? elif row_column_win(bcy_count,1,0,black_chess)==1:
? ? ? ? return 1
? ? elif xiejiao_win(white_chess)==1:
? ? ? ? return 0
? ? elif xiejiao_win(black_chess)==1:
? ? ? ? return 1

def draw_text(text,x,y,size):
? ? pygame.font.init()
? ? fontObj=pygame.font.SysFont('SimHei',size )
? ? textSurfaceObj=fontObj.render(text, True, white,black)
? ? textRectObj=textSurfaceObj.get_rect()
? ? textRectObj.center=(x,y)
? ? screen.blit(textSurfaceObj, textRectObj)
? ? pygame.display.update()

#定義服務(wù)器名稱(chēng)
HOST = '0.0.0.0'
PORT = 400
BUFSIZE = 1024
ADDR = (HOST,PORT)

#定義服務(wù)器屬性
tcpsersock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
tcpsersock.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) ?# 對(duì)socket的配置重用ip和端口號(hào)
tcpsersock.bind(ADDR)
tcpsersock.listen(1)
inputs=[tcpsersock]
print(inputs)

draw_board()
settable=1
link=False
while True:
? ? rs,ws,es=select.select(inputs, [], [],0)
? ? for r in rs:
? ? ? ? if r is tcpsersock:
? ? ? ? ? ? link=True
? ? ? ? ? ? print('new ser')
? ? ? ? ? ? tcpcliscock, addr = tcpsersock.accept()
? ? ? ? ? ? inputs.append(tcpcliscock)
? ? ? ? else:
? ? ? ? ? ? data,addr=r.recvfrom(BUFSIZE)
? ? ? ? ? ? disconnected=not data
? ? ? ? ? ? draw_text('你的回合',200,420,15)
? ? ? ? ? ? if disconnected:
? ? ? ? ? ? ? ? inputs.remove(r)
? ? ? ? ? ? ? ? draw_text('對(duì)手掉線',200,420,15)
? ? ? ? ? ? ? ? while True:
? ? ? ? ? ? ? ? ? ? for event in pygame.event.get():
? ? ? ? ? ? ? ? ? ? ? ? if event.type==QUIT:
? ? ? ? ? ? ? ? ? ? ? ? ? ? pygame.quit()
? ? ? ? ? ? ? ? ? ? ? ? ? ? sys.exit()
? ? ? ? ? ? else:
? ? ? ? ? ? ? ? data=json.loads(data)
? ? ? ? ? ? ? ? settable=1
? ? ? ? ? ? ? ? white_chess.append(data)
? ? ? ? ? ? ? ? wcx.append(data[0])
? ? ? ? ? ? ? ? wcy.append(data[1])
? ? for event in pygame.event.get():
? ? ? ? if event.type==QUIT:
? ? ? ? ? ? pygame.quit()
? ? ? ? ? ? sys.exit()
? ? ? ? ? ? tcpsersock.close()
? ? ? ? if link==True:
? ? ? ? ? ? if settable==1:
? ? ? ? ? ? ? ? if set_chess()==1:
? ? ? ? ? ? ? ? ? ? draw_text('對(duì)手回合',200,420,15)
? ? ? ? ? ? ? ? ? ? settable=0
? ? ? ? ? ? ? ? ? ? msg1=json.dumps(msg)
? ? ? ? ? ? ? ? ? ? tcpcliscock.sendto(msg1.encode(),ADDR)
? ? ? ? ? ? ? ? ? ? msg=[] ? ? ??
? ? draw_chess()
? ? if gameover()==1:
? ? ? ? draw_text('你贏了!',200,420,15)
? ? ? ? while True:
? ? ? ? ? ? for event in pygame.event.get():
? ? ? ? ? ? ? ? if event.type==QUIT:
? ? ? ? ? ? ? ? ? ? pygame.quit()
? ? ? ? ? ? ? ? ? ? sys.exit()
? ? elif gameover()==0:
? ? ? ? draw_text('你輸了!',200,420,15)
? ? ? ? while True:
? ? ? ? ? ? for event in pygame.event.get():
? ? ? ? ? ? ? ? if event.type==QUIT:
? ? ? ? ? ? ? ? ? ? pygame.quit()
? ? ? ? ? ? ? ? ? ? sys.exit()
tcpcliscock.close()
tcpsersock.close()

客戶(hù)端:

# -*- coding: utf-8 -*-
"""
Created on Tue Jun ?8 14:03:09 2021

@author: Administrator
"""
import pygame
import sys
from pygame.locals import *
from collections import Counter
from socket import *
from time import ctime
import json
import select
import socket
import time

#界面初始化
screen=pygame.display.set_mode((400,450))
pygame.display.set_caption('五子棋')
pygame.init()

#圖片導(dǎo)入
img_board=pygame.image.load('F:/images/五子棋/chess_board.png')
img_bchess=pygame.image.load('F:/images/五子棋/black_chess.jpg')
img_wchess=pygame.image.load('F:/images/五子棋/white_chess.jpg')

#顏色
white=(255,255,255)
black=(0,0,0)

#用于傳送的數(shù)據(jù)
msg=[]

#棋盤(pán)定義
chess_board=[[]]
def set_chess_board():
? ? x,y=0,0
? ? while True:
? ? ? ? if x==400:
? ? ? ? ? ? x=0
? ? ? ? ? ? y+=40
? ? ? ? ? ? if y<400:
? ? ? ? ? ? ? ? chess_board.append([])
? ? ? ? if y==400:
? ? ? ? ? ? break
? ? ? ? chess_board[-1].append([x,y])
? ? ? ? x+=40
set_chess_board()

#棋盤(pán)格子是否落子
chess_exist=[[0 for i in range(10)]for j in range(10)]
#黑白棋子初始化
black_chess,white_chess=[],[]
#棋子類(lèi)型
chess_kind=1 ? ?#1為黑棋,0為白棋
wcx,wcy,bcx,bcy=[],[],[],[] ? #white_chess_x

def draw_board():
? ? for i in chess_board:
? ? ? ? for j in i:
? ? ? ? ? ? screen.blit(img_board,(j[0],j[1]))
? ? ? ? ? ? pygame.display.update()

#默認(rèn)棋子類(lèi)型為0
def set_chess():
? ? if event.type==MOUSEBUTTONDOWN:
? ? ? ? pos=pygame.mouse.get_pos()
? ? ? ? for i in range(len(chess_board)):
? ? ? ? ? ? for j in range(len(chess_board[i])):
? ? ? ? ? ? ? ? if chess_board[i][j][0]<pos[0]<chess_board[i][j][0]+40 and chess_board[i][j][1]<pos[1]<chess_board[i][j][1]+40:
? ? ? ? ? ? ? ? ? ? if chess_exist[i][j]==0:
? ? ? ? ? ? ? ? ? ? ? ? white_chess.append([i,j])
? ? ? ? ? ? ? ? ? ? ? ? wcx.append(white_chess[-1][0])
? ? ? ? ? ? ? ? ? ? ? ? wcy.append(white_chess[-1][1])
? ? ? ? ? ? ? ? ? ? ? ? msg.extend((i,j))
? ? ? ? ? ? ? ? ? ? ? ? chess_exist[i][j]=1
? ? ? ? ? ? ? ? ? ? ? ? pygame.display.update()
? ? ? ? ? ? ? ? ? ? ? ? return 1

def draw_chess():
? ? for i in white_chess:
? ? ? ? screen.blit(img_wchess,(i[1]*40,i[0]*40))
? ? for i in black_chess:
? ? ? ? screen.blit(img_bchess,(i[1]*40,i[0]*40))
? ? pygame.display.update()

def row_column_win(x,m,n,chess):
? ? for i in x:
? ? ? ? if x[i]>=5:
? ? ? ? ? ? xy=[]
? ? ? ? ? ? for j in chess:
? ? ? ? ? ? ? ? if j[m]==i:
? ? ? ? ? ? ? ? ? ? xy.append(j[n])
? ? ? ? ? ? xy.sort()
? ? ? ? ? ? count=0
? ? ? ? ? ? for j in range(len(xy)-1):
? ? ? ? ? ? ? ? if xy[j]+1==xy[j+1]:
? ? ? ? ? ? ? ? ? ? count+=1
? ? ? ? ? ? ? ? else:
? ? ? ? ? ? ? ? ? ? count=0
? ? ? ? ? ? if count>=4:
? ? ? ? ? ? ? ? return 1

def xiejiao_win(chess):
? ? x,y=[],[]
? ? chess.sort()
? ? for i in chess:
? ? ? ? x.append(i[0])
? ? ? ? y.append(i[1])
? ? c,first,last=0,0,0
? ? for i in range(len(x)-1):
? ? ? ? if x[i+1]!=x[i]:
? ? ? ? ? ? if x[i]+1==x[i+1]:
? ? ? ? ? ? ? ? c+=1
? ? ? ? ? ? ? ? last=i+1
? ? ? ? ? ? else:
? ? ? ? ? ? ? ? if c<4:
? ? ? ? ? ? ? ? ? ? first=i+1
? ? ? ? ? ? ? ? ? ? c=0
? ? ? ? ? ? ? ? else:
? ? ? ? ? ? ? ? ? ? last=i
? ? ? ? ? ? ? ? ? ? print(last)
? ? ? ? ? ? ? ? ? ? break
? ? ? ? else:
? ? ? ? ? ? last=i+1
? ? if c>=4:
? ? ? ? dis=[]
? ? ? ? for i in range(first,last+1):
? ? ? ? ? ? dis.append(x[i]-y[i])
? ? ? ? count=Counter(dis)
? ? ? ? for i in count:
? ? ? ? ? ? if count[i]>=5:
? ? ? ? ? ? ? ? return 1
? ? ? ? dis=[]
? ? ? ? x2=[i*(-1) for i in x]
? ? ? ? for i in range(first,last+1):
? ? ? ? ? ? dis.append(x2[i]-y[i])
? ? ? ? count=Counter(dis)
? ? ? ? for i in count:
? ? ? ? ? ? if count[i]>=5:
? ? ? ? ? ? ? ? return 1

def gameover():
? ? wcx_count,wcy_count,bcx_count,bcy_count=Counter(wcx),Counter(wcy),Counter(bcx),Counter(bcy)
? ? if row_column_win(wcx_count,0,1,white_chess)==1:
? ? ? ? return 1
? ? elif row_column_win(bcx_count,0,1,black_chess)==1:
? ? ? ? return 0
? ? elif row_column_win(wcy_count,1,0,white_chess)==1:
? ? ? ? return 1
? ? elif row_column_win(bcy_count,1,0,black_chess)==1:
? ? ? ? return 0
? ? elif xiejiao_win(white_chess)==1:
? ? ? ? return 1
? ? elif xiejiao_win(black_chess)==1:
? ? ? ? return 0

def draw_text(text,x,y,size):
? ? pygame.font.init()
? ? fontObj=pygame.font.SysFont('SimHei',size )
? ? textSurfaceObj=fontObj.render(text, True, white,black)
? ? textRectObj=textSurfaceObj.get_rect()
? ? textRectObj.center=(x,y)
? ? screen.blit(textSurfaceObj, textRectObj)
? ? pygame.display.update()

#定義客戶(hù)端名稱(chēng)
HOST = '10.203.111.180'
PORT = 400
BUFSIZE = 1024
ADDR = (HOST,PORT)

#連接服務(wù)器
tcpCliSock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
tcpCliSock.connect(ADDR)
inputs=[tcpCliSock]

draw_board()
settable=0
while True:
? ? rs,ws,es=select.select(inputs,[],[],0)
? ? for r in rs:
? ? ? ? if r is tcpCliSock:
? ? ? ? ? ? data,addr = r.recvfrom(BUFSIZE)
? ? ? ? ? ? draw_text('你的回合',200,420,15)
? ? ? ? ? ? data=json.loads(data)
? ? ? ? ? ? settable=1
? ? ? ? ? ? black_chess.append(data)
? ? ? ? ? ? bcx.append(data[0])
? ? ? ? ? ? bcy.append(data[1])
? ? for event in pygame.event.get():
? ? ? ? if event.type==QUIT:
? ? ? ? ? ? tcpCliSock.close()
? ? ? ? ? ? pygame.quit()
? ? ? ? ? ? sys.exit()
? ? ? ? if settable==1:
? ? ? ? ? ? if set_chess()==1:
? ? ? ? ? ? ? ? draw_text('對(duì)手回合',200,420,15)
? ? ? ? ? ? ? ? settable=0
? ? ? ? ? ? ? ? msg1=json.dumps(msg)
? ? ? ? ? ? ? ? tcpCliSock.sendto(msg1.encode(),ADDR)
? ? ? ? ? ? ? ? msg=[]
? ? draw_chess()
? ? if gameover()==1:
? ? ? ? draw_text('你贏了!',200,420,15)
? ? ? ? while True:
? ? ? ? ? ? for event in pygame.event.get():
? ? ? ? ? ? ? ? if event.type==QUIT:
? ? ? ? ? ? ? ? ? ? pygame.quit()
? ? ? ? ? ? ? ? ? ? sys.exit()
? ? elif gameover()==0:
? ? ? ? draw_text('你輸了!',200,420,15)
? ? ? ? while True:
? ? ? ? ? ? for event in pygame.event.get():
? ? ? ? ? ? ? ? if event.type==QUIT:
? ? ? ? ? ? ? ? ? ? pygame.quit()
? ? ? ? ? ? ? ? ? ? sys.exit()

背景:

黑棋:

白棋:

效果演示:

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • Python中eval函數(shù)的表達(dá)式作用示例

    Python中eval函數(shù)的表達(dá)式作用示例

    這篇文章主要介紹了Python中eval函數(shù)的表達(dá)式用法示例,文中通過(guò)示例對(duì)比來(lái)為大家進(jìn)行詳細(xì)的講解,有需要的朋友可以借鑒參下,希望有所幫助
    2021-09-09
  • Django ModelSerializer實(shí)現(xiàn)自定義驗(yàn)證的使用示例

    Django ModelSerializer實(shí)現(xiàn)自定義驗(yàn)證的使用示例

    本文主要介紹了Django ModelSerializer實(shí)現(xiàn)自定義驗(yàn)證的使用示例,多種字段驗(yàn)證器幫助開(kāi)發(fā)者確保數(shù)據(jù)的完整性和準(zhǔn)確性,具有一定的參考價(jià)值,感興趣的可以了解一下
    2023-11-11
  • python求解水仙花數(shù)的方法

    python求解水仙花數(shù)的方法

    這篇文章主要介紹了python求解水仙花數(shù)的方法,較為詳細(xì)的分析了水仙花數(shù)問(wèn)題的概念與對(duì)應(yīng)解決方法的實(shí)現(xiàn)技巧,需要的朋友可以參考下
    2015-05-05
  • Python實(shí)現(xiàn)獲取照片拍攝日期并重命名的方法

    Python實(shí)現(xiàn)獲取照片拍攝日期并重命名的方法

    這篇文章主要介紹了Python實(shí)現(xiàn)獲取照片拍攝日期并重命名的方法,涉及Python針對(duì)文件屬性及文件名相關(guān)操作技巧,需要的朋友可以參考下
    2017-09-09
  • 使用opencv識(shí)別圖像紅色區(qū)域,并輸出紅色區(qū)域中心點(diǎn)坐標(biāo)

    使用opencv識(shí)別圖像紅色區(qū)域,并輸出紅色區(qū)域中心點(diǎn)坐標(biāo)

    這篇文章主要介紹了使用opencv識(shí)別圖像紅色區(qū)域,并輸出紅色區(qū)域中心點(diǎn)坐標(biāo),具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2020-06-06
  • 在Sublime Editor中配置Python環(huán)境的詳細(xì)教程

    在Sublime Editor中配置Python環(huán)境的詳細(xì)教程

    這篇文章主要介紹在sublime編輯器中安裝python軟件包,以 實(shí)現(xiàn)自動(dòng)完成等功能,并在sublime編輯器本身中運(yùn)行build,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),需要的朋友參考下吧
    2020-05-05
  • Django之創(chuàng)建引擎索引報(bào)錯(cuò)及解決詳解

    Django之創(chuàng)建引擎索引報(bào)錯(cuò)及解決詳解

    這篇文章主要介紹了Django之創(chuàng)建引擎索引報(bào)錯(cuò)及解決詳解,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2019-07-07
  • Selenium之模擬登錄鐵路12306的示例代碼

    Selenium之模擬登錄鐵路12306的示例代碼

    這篇文章主要介紹了Selenium之模擬登錄鐵路12306的示例代碼,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-07-07
  • python中怎么表示空值

    python中怎么表示空值

    在本篇內(nèi)容里小編給大家整理了關(guān)于python如何表示空值的知識(shí)點(diǎn)內(nèi)容,有興趣的朋友們可以跟著學(xué)習(xí)參考下。
    2020-06-06
  • 用Python爬取QQ音樂(lè)評(píng)論并制成詞云圖的實(shí)例

    用Python爬取QQ音樂(lè)評(píng)論并制成詞云圖的實(shí)例

    今天小編就為大家分享一篇用Python爬取QQ音樂(lè)評(píng)論并制成詞云圖的實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2019-08-08

最新評(píng)論