JavaScript
x
4
1
a = "ns "
2
for i in a:
3
print(i,end = "pn")
4
this is the output Why there is space and p in last line in output ????
Advertisement
Answer
It is because your string contains a space and n is treated as a line break, leaving a p at the end of each line.