Check Palindrome

5

1 votes
Problem

Create a code which takes a list of strings as input. You need to identify the palindromic  strings in the given inputs and returns the list with such palindromes alone. Print Nill if none palindromes are present. (Ignore Case Sensitive)

Note:

i. A palindrome is a a word, phrase, or sequence that reads the same backwards as forwards, e.g. madam
ii. The check for the string to be palindrome should be case-insensitive , e.g. madam and Madam both should be considered as palindrome.

You can use the below sample input and output to verify your solution.

Sample Input:

The first line in the sample input is the count of strings to be included in the list as the 1st input. The strings are then provided one by one in the next n lines of input.
3
hello
Malayalam
Radar

Output:
[Malayalam,Radar]


 

 

 

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?