使用列表:列表就像使用方括号创建的项目数组。它们与数组不同,因为它们可以包含不同类型的项目。列表与元组不同,因为它们是可变的。
# A Python program to to return multiple
# values from a method using list
# This function returns a list
def fun():
str = "geeksforgeeks"
x = 20
return [str, x];
# Driver code to test above method
list = fun()
print(list)
使用词典:词典类似于其他语言中的哈希或地图
# A Python program to to return multiple
# values from a method using dictionary
# This function returns a dictionary
def fun():
d = dict();
d['str'] = "GeeksforGeeks"
d['x'] = 20
return d
# Driver code to test above method
d = fun()
print(d)
三个资料Q群下载不了也转发不了,先放这里Fine_tuning.zipLangChain.zipdata_clear.rar