摘要:
class User(): def __init__(self,first_name,last_name,*toppings): # *toppings (带*号表示任意数量的形参) self.extra_info = [] # 建立空列表,作为容纳可选实参的空间,这里要注意为了能够在整个 self 阅读全文
摘要:
class User(): def __init__(self,first_name,last_name,*toppings): # *toppings (带*号表示任意数量的形参) self.extra_info = [] # 建立空列表,作为容纳可选实参的空间,这里要注意为了能够在整个 self 阅读全文
摘要:
def build_profile(first,last,**user_info): #**号创建空字典 """creat a dictionary,including all of users which we know""" profile = {} #程序的关键部分就是字典的建立,首先有一个空 阅读全文
|