+ 1
Am I Wrong or Is Python’s Training Exercise?
What about the space though? In the example they give before you do the exercise the program is written like so: >>> "Spam" + 'eggs' 'Spameggs' But in the other program for the exercise it says: >>> “Hello” + ‘world’ ‘Hello world’ No the extra space in between Hello and world isn’t a typo that’s how it’s written up. Could someone explain this to me?
4 ответов
+ 1
Hi Jake, I can tell you for a fact that the second command is definitely wrong.
If you don't recall exactly how it was given, one possibility is that the strings were not concatenated, instead passed as arguments to the print() function, like so:
print("Hello", 'world')
One more thing I noticed is that the characters around “Hello” and ‘world’ actually aren't the regular quotes, so that could be something.
+ 3
I have looked it up. There is a space after Hello inside the quotes.
0
Ok cool was jw, and I’m ok with being wrong too 😂. Constructive criticism is what I live for
0
Anytime!