functions in python return a list example
Example: return a list python
def retList():
list = []
for i in range(0,10):
list.append(i)
return list
a = retList()
print a
#Output [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
def retList():
list = []
for i in range(0,10):
list.append(i)
return list
a = retList()
print a
#Output [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]