0
Doubt on for loop?
for i in range(1,6): for j in range(i): print("*",end=" ") print() Here in the last line print() what we are calling to print. Without using that print() statement why all stars comes in single line even we give end="". Thank you
4 Réponses
+ 2
Because after the inner loop ends you need to break a line. Which that empty print statement does.
0
Thank you now I understand for breaking the loop we give print() at the end. Thank you brother for your reply
0
Yeah it's not for breaking the line but allowing the console to change line or you can say a line break.