+ 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?

21st Mar 2018, 5:14 PM
Jake
4 Respostas
+ 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.
21st Mar 2018, 5:37 PM
Just A Rather Ridiculously Long Username
+ 3
I have looked it up. There is a space after Hello inside the quotes.
21st Mar 2018, 7:34 PM
Paul
Paul - avatar
0
Ok cool was jw, and I’m ok with being wrong too 😂. Constructive criticism is what I live for
21st Mar 2018, 6:57 PM
Jake
0
Anytime!
17th May 2018, 8:37 PM
Just A Rather Ridiculously Long Username