Apr-20-2017, 09:50 PM
(This post was last modified: Apr-20-2017, 09:50 PM by idontreallywolf.)
# initalizing variables startvalue = 1 lst = [] # handling ValueErrors (in case user inputs a letter instead of number) try: limit = int(raw_input("Enter Limit: ")) copies = int(raw_input("How many copies would you like? : ")) except ValueError: print "Error: Invalid input." # iterating x times startvalue to limit. for i in range(startvalue,limit): lst.append(i) # since start value is 1 there will be a missing number and this is a work-around solution. lst.append(lst[-1]+1) # printing the numbers ( copies ) times. With tabs. for i in range(copies): print ' '.join(str(x) for x in lst)