I have a function:
def get_val():
for a in b:
c = b['values']
print (c)
When I call the function get_val()
, I get the result which is a long list of values with numbering up to 1000. type(c)
is float
.
Now I want to store this result from the function into a variable e. I tried using return c
instead of print(c)
Return function is not convenient because it will only return a line instead of the whole 1000.