+ 1
Why my answer is not show " spameggs "
first string ="spam" second string ="eggs" print("First string" + "second string")
3 Antworten
+ 6
You are using quotation marks in your print statement. So you're creating new strings instead of accessing the variables.
Also you have to write your variables in one piece: firststring
+ 6
Because in the print function you're concatenating two string I.e first string+ second string together not two variables. For printing spameggs you need to write like this
print(first_string + second_string)
Remember you can't put space in the name of variable, it'll cause syntax error. Hope it helps
+ 3
It is because you are putting the variable names in quotes which makes them a string. Also variable names don't include spaces. You have to write this instead...
print(first_string + second_string)