+ 1
In Python hen i run my programme it get an extra empty line, how to avoid this ?
7 Réponses
0
Maybe you have to put "i = input()" instead of "i = 'python is great, its awesome!'"
+ 2
Do print(end=''). By default print() has end='\n', printing newline after every new printed output
0
I tried it but didn't worked, kindly write what should i write exactly
With gratitude.
0
You do print('CONTENT') every time, right? Only the LAST time do print('CONTENT', end='') instead
0
Thanks a million my friend, it worked.
0
If i may ask you one more question please.
#my code goes here
i="python is great, its awesome!"
count=0
for w in i:
if w =="a" or w=="e" or w=="i" or w=="u" or w=="o":
count+=1
print(count,end="")
Now the output is currect but still not giving me any mark, why do you think what is wrong.
0
Your 100% right, i tried it and it worked
Many thanks for your help