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(),".")

 

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