0
i want to to print "fruits" in one line but its not working.can anyone help me using for loop in python
3 ответов
+ 1
In python the print goes to next line by default. You can give the end parameter. Try the below code
print (x, end="")
+ 1
Here's one:
for x in "fruits":
print(x,end="")
#(end) means that the printed character will have end data as a string instead of(\n)
#therefore output will be(fruits)
0
can you give example plz