fork download
  1. s = ['a', 'e', 'i', 'o', 'u']
  2. st = "nam pama kama"
  3. fin_count = 0
  4.  
  5. for i in st.split(' '):
  6. c = 0
  7. for k in s:
  8. c += [str(l) for l in i].count(k)
  9. fin_count += 2 if (c%2 == 0) else 1
  10.  
  11. print(fin_count)
Success #stdin #stdout 0.02s 63520KB
stdin
Standard input is empty
stdout
5