# 指定参数:将实际参数赋值给指定的形式参数# # 示例# def send(name,xx = "ok"):# ...## send(‘[email protected]‘,name="你好") # # 练习1def send(mail_addr,content,): print(mail_addr,content,) # print("发送邮件成功:",mail_addr,content) return True send("[email protected]","gook luck",) #默认参数,一一对应send(mail_addr=‘gook luck‘,content=‘[email protected]‘) #指定参数,指定为哪个参数赋值,不用按照顺序一一对应。
时间: 2024-10-05 14:53:34