Skip to content
Advertisement

Tag: indexing

I am confused in a part of my python code

Q-Given a string of lowercase letters in the range ascii[a-z], determine the index of a character that can be removed to make the string a palindrome. There may be more than one solution, but any will do. If the word is already a palindrome or there is no solution, return -1. Otherwise, return the index of a character to remove.

How to remove text in a list at each index

I have a list similar to: I need to modify the list to remove the first numbers only and display the list so that after each comma there is a new line. The expected output would be: I tried many codes but I’m lost now and don’t know how to arrive to my desired output. Answer One way would be

Advertisement