So I've been trying to figure how out how to print an ordered list of numbers that occur before a number, starting from one in python. Let me show you what I mean.
Here is my example.
x = 20
#I want to print this
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
#Another example
y = 5
1, 2, 3, 4, 5
Is there any piece of code or built-in function in python that will allow me to do this?