Re: Palindrome

From: Georgy Pruss (SEE_AT_THE_END_at_hotmail.com)
Date: 11/13/03


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')


Relevant Pages

  • Re: Palindrome
    ... > Does anyone know how i can fix my Palindrome program? ... algorithm a chore to read. ...
    (comp.lang.python)
  • Re: Palindrome
    ... > Does anyone know how i can fix my Palindrome program? ... Kom in verzet tegen dit kabinet: ...
    (comp.lang.python)
  • Re: Palindrome
    ... > Does anyone know how i can fix my Palindrome program? ... I´m not very experienced with Python but I think you could do it in a ... for c in inp: ...
    (comp.lang.python)