blob: babdcbe9a715137918457f2b5c0a3a16a5af2d13 (
plain)
1
2
3
4
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|