Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #18170 > unrolled thread

Re: Help in rotate 13 program

Started byPeter Otten <__peter__@web.de>
First post2011-12-29 14:10 +0100
Last post2011-12-29 14:10 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Help in rotate 13 program Peter Otten <__peter__@web.de> - 2011-12-29 14:10 +0100

#18170 — Re: Help in rotate 13 program

FromPeter Otten <__peter__@web.de>
Date2011-12-29 14:10 +0100
SubjectRe: Help in rotate 13 program
Message-ID<mailman.4217.1325164220.27778.python-list@python.org>
Sayantan Datta wrote:

> please help me, this code doesn't work,
> the output file comes out to be empty. How do i fix it? and where is it
> going wrong?

I don't know if that's a copy-n-paste error: the indentation of

>   if __name__ == '__main__' :
>     for line in sys.stdin :
>       for char in line :
> sys.stdout.write(rotate13_letter(char))

should be

if __name__ == '__main__':
    for line in sys.stdin:
        for char in line:
            sys.stdout.write(rotate13_letter(char))

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web