r/PythonLearning • u/N0-T0night • Jun 30 '25
Check palindrome
Check whether word in reverse order is the same or not like : mom,racecar,madam
57
Upvotes
r/PythonLearning • u/N0-T0night • Jun 30 '25
Check whether word in reverse order is the same or not like : mom,racecar,madam
1
u/RepresentativeFill26 Jun 30 '25
I don’t know the complexity of reversing a string through indexing but using a single for loop wouldn’t require additional memory.