I'm a python newbie (in fact I'm a programming newbie). I'm teaching myself python for the fun of it by reading several online tutorials and then creating useless little scripts.
For the past longer-than-I-would-care-to-admit I have been struggling to get this little bit of code to work:
When I print my "workingstr ing" I do not get spaces before and after '+' symbols. What am I doing wrong here?
For the past longer-than-I-would-care-to-admit I have been struggling to get this little bit of code to work:
Code:
for i in stringexp: if 'stringexp[i]' == '+': stringexp.insert[i, " "] stringexp.insert[(i + 1), " "] workingstring = "".join(stringexp) print workingstring
Comment