what is the use of end=" " in print function
Use of end='' ''
Hello @sapnabajpai2020, by using end = " " we can write our data just after this separating by the white space.
For eg.
In case of:
for i in range(5):
print(i)
The output for this will be:
0
1
2
3
4
But if we write:
In case of:
for i in range(5):
print(i,end=' ')
Then the output will be:
0 1 2 3 4
You can see in one case the nos. are printed in the diff line and in one case these are printed in the single line.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.