Printing the output tab separated..
I have a program where my ouput should be tab separated.ie The function should take one parameter that represents the number of 'steps' to print. It should then return a string that, when printed, shows output like the following: #print(steps(3)) 111 222 333 #print(steps(6)) 111 222 333 444 555 666 THis is the code I have written: def steps(no_steps): j = 0 for i in range(1, no_steps+1): print(("\t" * j) + (str(i) * 3) + "\n") j+=1 return '' print(steps(3)) print(steps(6)) BUt the output shows error as follow, We tested your code with num_steps = 3. We expected steps to return the str "111 222 333 ". However, it returned the str "". Please help, thanks.