So I was doing the “Learning Python” course from codecademy and this one exercise confused me a little…
so the direction was:
Write a function called
string_function that takes in a string argument (
s ) and then
return s that argument concatenated with the word
'world' . Don’t add a space before
and the answer was:
n = “Hello”
Your function here!
return s + ‘world’
so what i want to know is that how does “s” have a set value of “Hello” and if you do s + world, it comes out to be Hello World, also the fact that you print string_function(n) although, n was never an argument in string_function… im confused can someone help?