
# -*-coding:utf-8-*-import collectionsfrom random import choice, choicesCard = collections.namedtuple('Card....
@pip insatll 命令安装不上第三方库 you may need to restart the kernel to use updated packages 当在jupyter中用pip inst....
数组 class myArray: def __init__(self, capacity): self._data = [] self._capacity = capacity def ....
首先、进入cmd的方法:win+R打开运行窗口,然后在运行窗口中输入cmd,回车,进入命令行。 然后、输入以下命令: conda activ....
from selenium import webdriverimport timefrom selenium.webdriver.common.by import By# ie浏览器browser = webdriver.Ie....
def full_to_half(full_width_string): fullString = str(full_width_string) halfString = "" for schar in fullS....
随机数的计算 描述 通过键盘输入整数作为随机种子数。借助random库在屏幕上产生5个两位随机整数,在一行上打印这些数,数之....
sudo pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
爬取某直播平台所有正在直播的房间信息 from selenium import webdriverfrom selenium.webdriver.common.by import Byimport....
python异常一些汇总 python内置的异常 python内置的异常 python的Error有错误和异常两种。 常见错误是语法错误如:SyntaxErr....
#5.生成验证码# 验证码一般是包括一些随机产生的数字或符号,请实现随机生成一组6位验证码的功能。# 每个字符可以是大写字母....
# 1. 计算11+22+33+44+55的结果import mathdef test01(): result = 0 for i in range(1, 6): result += i * 10....
"""python魔法方法__len__,用于统计像list等对象中元素个数,对于自定义的类,是没有实现__len__方法的,故要想通过len()函....
pandas 默认 读取文本数据时,会自动读成object。 我们可以看到类型是object 通过convert_dtypes()可以自动读成最新支持的....
寻找与7有关的数 描述 找出1~100内所有与7有关的数,或者是7的倍数,或者含有数字7 for i in range(1,101): if i % 7 == ....
参考《计算机网络:自顶向下方法》 由客户端发送一串小写英文的字符串给服务端,服务端将其转为大写英文并发送回给客户端 UD....
Anaconda 安装skimage出错: ERROR: Could not find a version that satisfies the requirement skimage ERROR: No matching....
继续实行通常的索引定位与数据选择操作 import numpy as npimport pandas as pddates=pd.date_range('20201024',....
1.启动服务器 格式:python manager.py runserver ip:port 2.注意事项 2.1 ip可以不写,不写就代表本机 2.2 默认端口号是80....