+ 2
Does this work
s=range(1,10) print(s) Does it give the values between the range or is there a way
7 Respuestas
+ 3
I think you can go with a list
s = [i for i in range(1,10)]
print(s)
+ 3
The output will be range(1,10)
And the type of s will be range
+ 3
print(*range(1,10))
+ 3
you can also use list constructor to get the values printed:
s = list(range(1,10))
print(s)
# result is: [1, 2, 3, 4, 5, 6, 7, 8, 9]
+ 1
Ok, thank you
+ 1
s = range(1,10)
print(*enumerate(s))