def matchWords(words):
counter = 0
for word in words:
if len(word) > 1 and word[0] == word[-1]:
counter += 1
return counter
print(matchWords(['abc', 'xyz', 'aba', '1221']))
Code Example |
---|
Python :: |
:: remove unnamed 0 column pandas |
:: |
Python :: |
:: |
Python :: |
Python :: |
:: |
:: setting p a virtual envioronment |
:: |
:: |
:: |
:: |
:: |
Python :: |
Python :: |
Python :: |
:: |
:: |
:: |
Python :: |
Python :: |
:: |
Python :: pandas replace values based on condition |
Python :: |
Python :: Plotly set axes labels |
Python :: |
Python :: pandas create column if equals |
:: |
:: removing whitespaces from pandas dataframe csv |