Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18170 > unrolled thread
| Started by | Peter Otten <__peter__@web.de> |
|---|---|
| First post | 2011-12-29 14:10 +0100 |
| Last post | 2011-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.
Re: Help in rotate 13 program Peter Otten <__peter__@web.de> - 2011-12-29 14:10 +0100
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Date | 2011-12-29 14:10 +0100 |
| Subject | Re: 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))
Back to top | Article view | comp.lang.python
csiph-web