摘要:
##小程序,计算一个字符串中每个字符出现的次数+ import pprint message = 'It was a bright cold day in April, and the clocks were striking thirteen.' count = {} for character in message: count.setdefault(character, 0) ... 阅读全文
摘要:
''' picnicItems 野餐用品清单 picnicItems sandwiches.................... 4apples........................ 12cups.......................... 4cookies........... 阅读全文
摘要:
def boxPrint(symbol, width, height): if len(symbol) != 1: raise Exception('Symbol(符号) must be a single character string.') if width <= 2: raise Exception('Width must be greate... 阅读全文
摘要:
birthdays = {'Alice': 'Apr 1', 'Bob': 'Dec 12', 'Carol': 'Mar 4'} while True: print('Enter a name: (blank to quit)') name = input() if name == '': break if name in birthdays: ... 阅读全文
该文被密码保护。 阅读全文
摘要:
import requests from pyquery import PyQuery as pq url='http://www.51xxx.com/Try/index/p/3' headers={ 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chro... 阅读全文
摘要:
A.右键.py文件,edit with idle B.如果没有这个选项: 选择打开方式,进入python安装路径,选择 Python37\Lib\idlelib\idle.bat 阅读全文
摘要:
''' 【生产者】正在生产 1 中......【消费者】正在消费 1 中...【生产者】消费者返回了:OK,完成消费!! !【生产者】正在生产 2 中......【消费者】正在消费 2 中...【生产者】消费者返回了:OK,完成消费!! !【生产者】正在生产 3 中......【消费者】正在消费 3 阅读全文