zoukankan      html  css  js  c++  java
  • 默认形参 与 关键字实参的区别

    # ### 默认形参 与 关键字实参的区别
    # 函数的定义处 top middle bottom ... 默认形参
    def five_class_xiongda_team(top="黄熊大",middle="黄文",bottom="罗婷",jungle="黄将用",support="王文"):
    	print("top上单选手{top}".format(top=top))
    	print("middle中单选手{middle}".format(middle=middle))
    	print("bottom下路选手{bottom}".format(bottom=bottom))
    	print("jungle打野选手{jungle}".format(jungle=jungle))
    	print("support辅助选手 最后的希望vip{support}".format(support=support))
    # 函数的调用处
    # 关键字实参
    # five_class_xiongda_team() top middle bottom ... 关键字实参
    five_class_xiongda_team(top="黄于正",middle="王俊文",bottom="潘伟成",jungle="张国成")
    

      

  • 相关阅读:
    sql刷题day03
    sql刷题day2
    sql刷题day1
    Vue学习
    HashMap学习笔记整理
    数组问题(鸽巢原理、数字交换、链表寻环)
    mybatis参数设置问题
    codeforces 327A
    codeforces 189A
    codeforces-455A
  • 原文地址:https://www.cnblogs.com/huangjiangyong/p/10823148.html
Copyright © 2011-2022 走看看