In this case, I wanted every line to end with a y character rather than a y character on a newline.
Anyways, playing around with those will help grasp it better.
Yes, that's my point. Your code currently does not end every line with a y.
~ 🌲 python3
Python 3.9.0 (default, Nov 30 2020, 15:21:09)
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello James", end="y\n")
Hello Jamesy
>>> print("How are you doing", end="\n")
How are you doing
Your end for the second print is just \n. It is missing a y in it.
You'll have to include the end="y" un every print statement . In the second print statement you wrote, you didn't include the end="y" and that's why you didn't get the y at the end of it.
I'm aware. This is your code, not mine. Your code does not currently include end="y\n" for the second line, just end="\n". However, you then show output with every line ending in a y: i.imgur.com/haIqpYx.png
In section 2, you have the following snippet:
which you say outputs:
Shouldn't the snippet instead be:
In this case, I wanted every line to end with a
ycharacter rather than aycharacter on a newline.Anyways, playing around with those will help grasp it better.
Yes, that's my point. Your code currently does not end every line with a
y.Your
endfor the second print is just\n. It is missing ayin it.You'll have to include the
end="y"un every print statement . In the second print statement you wrote, you didn't include theend="y"and that's why you didn't get theyat the end of it.I'm aware. This is your code, not mine. Your code does not currently include
end="y\n"for the second line, justend="\n". However, you then show output with every line ending in ay: i.imgur.com/haIqpYx.pngOh thanks 🤦 I hadn't notice it . I'm really sorry for this
No problem! Happy to help!