Please post code in [code] tags. This preserves whitespace for indentation, uses a fixed width font and puts the code in a highlighted box. All this really improves readability, and with something like python actually changes the code's meaning (as indentation has meaning).
sed's substitution command (s/pattern/replacement/options) does not do a simple string replace... the pattern is a regular expression, which has many special characters. If those in your search pattern, these are special characters: . [ ] ?
For all these special characters, you must escape them. Usually this would mean prefixing them with a backslash, like this:
echo '[1 (yes) or 0 (no)]: 0' | sed 's/\[1 (yes) or 0 (no)\]: 0/replacement done/g'
If you paste this onto the command line, you'll see it works from the output.
There is one slight complication in your script. You are using double quotes, and you cannot pass backslashes so easily in double quotes, as the shell uses it as an escape character. See the differences in output of these two commands:
$ echo '\[ \] \" \$'
\[ \] \" \$
$ echo "\[ \] \" \$"
\[ \] " \$
Double quotes pass the backslash sometimes and not others... So I recommend when setting the value of string and stringout use single quotes. Make sure you don't get confused with the backtick and the single quote... the backtick has an altogether different usage in shell scripting.