Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Palindrome Test
#5
If you are trying to save memory with palindrome_check, you should use reversed instead the use of index access. The index access creates a new list in memory. The reversed object is evaluated lazy.

But this is not important for words. With very long text, this can make sense.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
Palindrome Test - by mcmxl22 - Mar-03-2019, 05:25 PM
RE: Palindrome Test - by perfringo - Mar-04-2019, 07:13 AM
RE: Palindrome Test - by DeaD_EyE - Mar-04-2019, 08:43 AM
RE: Palindrome Test - by perfringo - Mar-04-2019, 09:29 AM
RE: Palindrome Test - by DeaD_EyE - Mar-04-2019, 12:29 PM
RE: Palindrome Test - by perfringo - Mar-04-2019, 01:48 PM
RE: Palindrome Test - by rootVIII - Mar-05-2019, 03:37 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020