Removing character Python doesn't like at runtime