Hello I want to create a list of strings where each string is a number.
Fox example given the number 4 I would like to create a function that returns a list with ele
map being frowned upon by many python developers, here is the comprehension list equivalent:
map
[str(x) for x in range(my_value + 1)]
You can do this with str and range like this
str
range
map(str, range(number + 1))
When number = 4,
number = 4
print(map(str, range(4 + 1))) # ['0', '1', '2', '3', '4']