We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c3288d commit 595ebc2Copy full SHA for 595ebc2
programacao_funcional/funcao_como_objeto/filtro_mapa.py
@@ -0,0 +1,11 @@
1
+alunos = [('Renzo', 0), ('Luciano', 10), ('Ada', 9)]
2
+
3
+print([(nome, nota) for nome, nota in alunos if nota > 5])
4
5
6
+def possui_nota_maior_que_5(aluno):
7
+ _, nota = aluno
8
+ return nota > 5
9
10
11
+print(list(filter(possui_nota_maior_que_5, alunos)))
0 commit comments