>>>>> akhil1988 <akhilan...@gmail.com> (a) wrote: >a> Well, you were write: unintentionally I removed strip(). But the problem >does >a> not ends here:
>a> I get this error now: >a> File "./temp.py", line 488, in <module> >a> main() >a> File "./temp.py", line 475, in main >a> for line in sys.stdin: >a> File "/usr/local/lib/python3.1/codecs.py", line 300, in decode >a> (result, consumed) = self._buffer_decode(data, self.errors, final) >a> UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-2: invalid >a> data >a> for this line: >a> รข Your Python assumes stdin uses utf-8 encoding, probably because your locale says so. But it seems the input is not really utf-8 but some other encoding. -- Piet van Oostrum <p...@cs.uu.nl> URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: p...@vanoostrum.org -- http://mail.python.org/mailman/listinfo/python-list