7 - 12: Strings in functions



So my code throws an error that says:
Oops, try again. string_function('Hello') returned u'world' instead of 'Helloworld'

Any help would be appreciated.

n = "Hello"
# Your function here!
def string_function(s):
    n = raw_input() + "world"
    return n

print string_function(n)


Wouldn't it be,

s + " world"



The instructions say not to add a space before "world", so I think its something else.


Then ignore the space, but replace raw_input() with s.


That worked like a charm! Thanks!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.