[Solved] Counting characters in a list


not quite sure what you what to do, but i guess this should work:

for elem in line:
  if type(elem) == int:
     result += 1
  elif type(elem) == list:
     for sub in elem:
        if type(sub) == int:
           result += 1

bear in mind that this code is realy ugly 😉 but it should help get you started

1

solved Counting characters in a list