📜  python代码示例中的返回对象

📅  最后修改于: 2022-03-11 14:45:35.888000             🧑  作者: Mango

代码示例1
# This function returns a dictionary
def foo():
     d = dict();
     d['str'] = "Tutorialspoint"
     d['x']   = 50
     return d
print foo()

#Output
#'x': 50, 'str': 'Tutorialspoint'}