首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看Python
def make_car(manufacturer,model,**type_info):
    """创建一个字典,其中包含我们知道的有关用户的一切"""
    profile = {}
    profile['manufacturer'] = manufacturer
    profile['model'] = model
    for key,value in type_info.items():
        profile[key] = value
    return profile
    
car = make_car('subaru','outback',color = 'blue',tow_package = True)
print(car)
阅读全部 | GunL 贴于 2021年7月6日 21:35     hide bbsi
def make_car(manufacturer,model,**type_info):
    """创建一个字典,其中包含我们知道的有关用户的一切"""
    profile = {}
    profile['manufacturer'] = manufacturer
    profile['model'] = model
    for key,value in type_info.items():
        profile[key] = value
    return profile
    
car = make_car('subaru','outback',color = 'blue',tow_package = True)
print(car)
阅读全部 | GunL 贴于 2021年7月6日 21:35     hide bbsi
magicians = ['ergou','qiqi','shitou']
great_magicians = []

def make_great(magicians,great_magicians):
    while magicians:
        magician = magicians.pop()
        great_magician = 'the Great' + magician
        great_magicians.append(great_magician)
        
def show_magicianslis(great_magicians):
    for name in great_magicians:
        print(name)
......................
阅读全部 | GunL 贴于 2021年7月6日 21:33     hide bbsi
magicians = ['ergou','qiqi','shitou']
great_magicians = []

def make_great(magicians,great_magicians):
    while magicians:
        magician = magicians.pop()
        great_magician = 'the Great' + magician
        great_magicians.append(great_magician)
        
def show_magicianslis(great_magicians):
    for name in great_magicians:
        print(name)
......................
阅读全部 | GunL 贴于 2021年7月6日 21:32     hide bbsi
def milk_album(name,album_name,number=''):
    album = {'name':name,'album_name':album_name}
    return album
while True:
    print("(enter 'q' at any time to quit)")
    name = input("请输入歌手名:")
    if name == 'q':
        break
    album_name = input("请输入专辑名:")
    if album_name == 'q':
        break 
    print(milk_album(name,album_name))
阅读全部 | GunL 贴于 2021年7月6日 21:29     hide bbsi
places = {}
polling_active = True
while polling_active:
    name = input("\n What is your name? ")
    response = input("If you could visit one place in the world, where would you go?")
    places[name] = response
    repeat = input("Would you like to let another person respond? (yes/ no) ")
    if repeat == 'no':
         polling_active = False
 
print("\n--- Poll Results ---")
 
......................
阅读全部 | GunL 贴于 2021年7月6日 21:20     hide bbsi
time.localtime()
阅读全部 | huangrujie01 贴于 2021年5月17日 14:39     hide bbsi
print("hello")
阅读全部 | wangyilin 贴于 2021年5月16日 12:41     hide bbsi
https://bbs.bccn.net/member.php?action=activate_bccn_uid=999054_bccn_id=mpZlUs
阅读全部 | xincheng1984 贴于 2021年4月14日 13:58     hide bbsi
# -*- coding:utf-8 -*-

import socket
from time import ctime, sleep
import threading


class ChatRoomPlus:
    def __init__(self):
        # 全局参数配置
        self.encoding = "utf-8"  # 使用的编码方式
        self.broadcastPort = 7788   # 广播端口
......................
阅读全部 | 静夜思 贴于 2021年4月6日 20:29     hide bbsi
上一页 10 11 12 13 14 15 16 17 18 19 下一页