python入門學習:--向函數傳遞信息

 

 

向函數傳遞信息:

def describe_pet(pet_name, animal_type='dog'):    
    '''顯示寵物的信息'''
    print(' I have a ',animal_type)
    print("My ", animal_type  ,"'s name is ", pet_name.title(),".")

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章