Re: Palindrome
From: Georgy Pruss (SEE_AT_THE_END_at_hotmail.com)
Date: 11/13/03
- Next message: Delaney, Timothy C (Timothy): "RE: Leo + Python: the ultimate scripting tool: Conclusion"
- Previous message: Ron Adam: "Re: case-sensitivity"
- In reply to: Runic911: "Palindrome"
- Next in thread: Ulrich Schramme: "Re: Palindrome"
- Reply: Ulrich Schramme: "Re: Palindrome"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 13 Nov 2003 05:35:32 GMT
Knowing what your program should do, could also help.
G-:
"Runic911" <runic911@aol.com> wrote in message news:20031112223135.29045.00000109@mb-m12.aol.com...
| Does anyone know how i can fix my Palindrome program?
|
| s = raw_input('Enter a String: ')
| punctuation = '%$!*.,-:? ;()\'\"\\'
| i = 0
| h = 0
| t = 0
| p = ''
| z = 0
| while s!= ' ':
| while i <= len(s) - 1:
| punct = s[i]
| if punctuation.find(punct) == -1:
| p = p + punct
| i = i + 1
| t = p.lower()
| t[h] == t[len(t)-1-h]
--
Georgy Pruss
E^mail: 'ZDAwMTEyMHQwMzMwQGhvdG1haWwuY29t\n'.decode('base64')
- Next message: Delaney, Timothy C (Timothy): "RE: Leo + Python: the ultimate scripting tool: Conclusion"
- Previous message: Ron Adam: "Re: case-sensitivity"
- In reply to: Runic911: "Palindrome"
- Next in thread: Ulrich Schramme: "Re: Palindrome"
- Reply: Ulrich Schramme: "Re: Palindrome"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|