from collections import Counter
lista_teste=[['Nome','Idade','Sexo','Profissão'],
['Pedro','25','Masculino','Médico'],
['Carlos','30','Masculino','Professor'],
['Ana','32','Masculino','Médico'],
['Rui','33','Masculino','Professor'],
['Afonso','18','Masculino','Professor']]
profissoes = [pessoa[3] for pessoa in lista_teste[1:]]
totais = Counter(profissoes)
print("Medicos={} Professores={}".format(totais['Professor'], totais['Médico']))
ZnJvbSBjb2xsZWN0aW9ucyBpbXBvcnQgQ291bnRlcgoKbGlzdGFfdGVzdGU9W1snTm9tZScsJ0lkYWRlJywnU2V4bycsJ1Byb2Zpc3PDo28nXSwKCQkJIFsnUGVkcm8nLCcyNScsJ01hc2N1bGlubycsJ03DqWRpY28nXSwKCQkJIFsnQ2FybG9zJywnMzAnLCdNYXNjdWxpbm8nLCdQcm9mZXNzb3InXSwKCQkJIFsnQW5hJywnMzInLCdNYXNjdWxpbm8nLCdNw6lkaWNvJ10sCgkJCSBbJ1J1aScsJzMzJywnTWFzY3VsaW5vJywnUHJvZmVzc29yJ10sCgkJCSBbJ0Fmb25zbycsJzE4JywnTWFzY3VsaW5vJywnUHJvZmVzc29yJ11dCgpwcm9maXNzb2VzID0gW3Blc3NvYVszXSBmb3IgcGVzc29hIGluIGxpc3RhX3Rlc3RlWzE6XV0KdG90YWlzID0gQ291bnRlcihwcm9maXNzb2VzKQpwcmludCgiTWVkaWNvcz17fSBQcm9mZXNzb3Jlcz17fSIuZm9ybWF0KHRvdGFpc1snUHJvZmVzc29yJ10sIHRvdGFpc1snTcOpZGljbyddKSk=