the task here is :
A. match_ends Given a list of strings, return the count of the number of strings where the string length is 2 or more and the first and last chars of the string are the same. Note: python does not have a ++ operator, but += works.
def match_ends(words):
for i in words:
if (len(i) >= 2) & (i[0] == i[-1]):
return [i]
print(match_ends(['aba', 'xyz', 'aa', 'x', 'bbb']))
and the output is :
['aba']