to count the number of strings where the string length is 2 or more and the first and last character are same

后端 未结 0 392
谎友^
谎友^ 2021-01-07 14:35

Sample List : [\'abc\', \'xyz\', \'aba\', \'1221\']

Expected Result : 2

def match_words(words):
  ctr = 0

  for word in words:
    if len(word) > 1         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题