Python raw_input messing up string concatenation
问题 I am trying to do something relatively simple in Python and am surprised at how badly this isn't working for how simple it should be. I'm here just trying to concatenate three simple strings. The input typed at raw_input is "abc" in all cases below: proj = raw_input("Name of project: ") print proj ProjRegex = 'test1' + proj + 'test2' print ProjRegex Yields: abc test2abc Case 2 proj = raw_input("Name of project: ") print proj ProjRegex = 'test1%stest2' % (proj) print ProjRegex Yields: abc