<dd id="sga4y"><optgroup id="sga4y"></optgroup></dd>
<nav id="sga4y"><code id="sga4y"></code></nav>
  • <optgroup id="sga4y"></optgroup>
    ???? Python ???
    ??7?? ????
    ???? ??????? ????

    ???????

    ????????????????????????????????????§Ö???????????????????????????§»????????????????? ??????? ????????????????????????????¦Ë????????????????????????????????????¦±?

    ???????????? ???? ???????????????????????????????¨²????????????????????????????????????????????????????????????§»?????????

    ??¨´??????

    ??7.6 ??¨´??????

    #!/usr/bin/python
    # Filename: func_key.py


    def func(a, b=5, c=10):
        print 'a is', a, 'and b is', b, 'and c is', c

    func(3, 7)
    func(25, c=24)
    func(c=50, a=100)

    ????????code/func_key.py??

    ???

    $ python func_key.py
    a is 3 and b is 7 and c is 10
    a is 25 and b is 5 and c is 24
    a is 100 and b is 5 and c is 50

    ????¦É???

    ???func???????????????????????????????????????????

    ????????¨²???????? func(3, 7)??????a????3??????b????7????????c???????10??

    ????????¨²???func(25, c=24)???????????¦Å?¦Ë?????a????25???????????????????????????c????24??????b???????????5??

    ??????????func(c=50, a=100)???????????¨´????????????????????????????????????§µ?a??c?????ÈÉ?????????????a?????????c?????


    ???? ????? ????
    ??????? ??? return???
    ?????
    @ssv 97av