0

Why did my code write like this

I want this. --> Nice to meet you But I got this --> Nice to Meet you

11th Oct 2021, 5:36 PM
Kaung Zayya
Kaung Zayya - avatar
4 Answers
+ 7
Kaung Zayya , 'For' has to be in lower case 'Print' has to be in lower case if you want to get the text printed in on line, you don't need to split the input. if it is just a test for you, you can print the list of words like: x = "Nice to meet you" y = x.split() print(*y) in this case you do not need a for loop
11th Oct 2021, 6:08 PM
Lothar
Lothar - avatar
+ 6
Please link your code!
11th Oct 2021, 5:43 PM
Lisa
Lisa - avatar
+ 2
Either just print x and don't split to y or use "end" parameter of print
11th Oct 2021, 6:09 PM
Lisa
Lisa - avatar
0
x = "Nice to meet you" y = x.split() For i in y: Print(i)
11th Oct 2021, 6:00 PM
Kaung Zayya
Kaung Zayya - avatar