Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18170
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Subject | Re: Help in rotate 13 program |
| Date | 2011-12-29 14:10 +0100 |
| Organization | None |
| References | <CANtuMdJMfLg4VXhuSowG-Tr1yzioACLWQqJHhgi49w4sJYSNWg@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4217.1325164220.27778.python-list@python.org> (permalink) |
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))
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Help in rotate 13 program Peter Otten <__peter__@web.de> - 2011-12-29 14:10 +0100
csiph-web