I am looking for a way to print the numbers 1-7 on 1 line, then print 8-14 on another, and finally 22-28, and 29-31 to the console. Here is what I have:

```
def check(z,y):
    if x >= (z) and x <= (y) :
        print (str(x) + " ", end="")

for x in range (1, 31):
    check(1,7)
    check(8,14)
    check(22,28)
    check(29,31)

```

this prints all the numbers 1-31 on the same line, but I dont know how to have 1-7 printed on the same line, without having the other numbers printed on the same line too. 
Also, i cant just do print(1,2,3,4,5,6,7)
and so forth.