Palindrome detection: Difference between revisions
Content deleted Content added
→{{header|Quackery}}: added inexact and twiddle indexing |
→{{header|Python}}: added Twiddle Indexing |
||
Line 4,458: | Line 4,458: | ||
'abba' -> True |
'abba' -> True |
||
'In girum imus nocte et consumimur igni' -> True</pre> |
'In girum imus nocte et consumimur igni' -> True</pre> |
||
'''With Twiddle Indexing''' |
|||
I have no idea what this technique is called, so I'm going with "Twiddle Indexing". |
|||
<lang Python>def palindromic(str): |
|||
for i in range(len(str)//2): |
|||
if str[i] != str[~i]: |
|||
return(False) |
|||
return(True)</lang> |
|||
=={{header|Quackery}}== |
=={{header|Quackery}}== |