NORMAL CODE:
s = list(range(1))
for i in s:
print(i)
RESULT: (Vertical Display)
0
1
2
3
4
I want the same result using a function which i can assign to a variable and use inside a string literal.
def results():
for i in s:
print(i)
numbers = results()
report = f"Here is the list on numbers: {numbers}"
RESULT: None
When i use 'return' inside function, i get just one value.
Any better way to do this???
print(s)?