Print spaces around --help.
Use idiomatic _ instead of foo.
str.replace is perfectly up to the task here.
Remove dead code.