dir函數pythonPython dir() function attempts to return a list of valid attributes for the given object. If no argument provided, then it returns the list of names in the current local scope. Python dir()函數嘗試返回給定對象的有效屬性列表。 如
python函數返回值的應用 1、代碼 def func(name,age,course):print(name,age,course)if age>22:print("too old to be a student")return Trueelse:return Falsestatue= func('zhang',29,'python')
print(statue) 2、運行截圖 3、return的含義