startnumber = int(input("What number do you want to start with? ")) endnumber = int(input("What number do you want to end with? ")) numbperline = int(input("Enter amount of numbers per line: ")) for number in range((endnumber + 1) - startnumber): print("{:3}".format(startnumber), end=" ") startnumber += 1 if startnumber % numbperline == 0: print()