remove white space in output using by sys.stdout.write()