Skip to content

Problem 2

Write a Python program to count the number of CHARACTERS from a list of items. If the STRING length of an item is at least 2 or more and the first and last character are the same then print the amount of strings

Example 1

MyList = [1,2,"aba", "bab"]

Expected output -> 2

Example 2

MyList = [212, 333, "abb", "racecar"]

Expected output -> 1

Example 3

Mylist = ["1ab", "tacocat"]

Expected output -> 1