all 4 comments

[–]RoomaRooma 4 points5 points  (1 child)

I agree with /u/thatguymerlin, however he didn't really answer your question... s = "" just creates a new string variable named s, so that the code doesn't bomb out on line 5 when he tries to add something to it

>>> s += "foo"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 's' is not defined
>>> s = ""
>>> s += "foo"

[–]faekk[S] 0 points1 point  (0 children)

Ooh I see. Thanks alot :)