fork download
  1. notas = [['NOME', 'G1', 'G2'], ['Paulo', '5.0', '7.2'], ['Pedro', '6', '4.1'], ['Ana', '3.3', '2.3'], ['Thereza', '5', '6.5'], ['Roberto', '7', '5.2'], ['Matheus', '6.3', '6.1']]
  2.  
  3. for nota in notas[1:]: ## [1:] skip the first item
  4. nome = nota[0]
  5. g1 = nota[1]
  6. g2 = nota[2]
  7. print ("NOME:{} | G1: {} | G2: {}".format(nome, g1, g2))
Success #stdin #stdout 0.02s 6860KB
stdin
Standard input is empty
stdout
NOME:Paulo | G1: 5.0 | G2: 7.2
NOME:Pedro | G1: 6 | G2: 4.1
NOME:Ana | G1: 3.3 | G2: 2.3
NOME:Thereza | G1: 5 | G2: 6.5
NOME:Roberto | G1: 7 | G2: 5.2
NOME:Matheus | G1: 6.3 | G2: 6.1