r/PythonLearning • • Jun 30 '25

Check palindrome

Post image

Check whether word in reverse order is the same or not like : mom,racecar,madam

57 Upvotes

76 comments sorted by

View all comments

1

u/Gandualp Jun 30 '25

You can cut time in half

1

u/N0-T0night Jun 30 '25

How

1

u/Gandualp Jun 30 '25

Try to do it without [::-1]

1

u/N0-T0night Jun 30 '25

With loop or not

1

u/Gandualp Jun 30 '25

With loop ofc

0

u/[deleted] Jun 30 '25

[deleted]

1

u/Gandualp Jun 30 '25

Of course my man