Aquesta és una revisió antiga del document


Python aberraciones

  • operador ternario:
    variable = "valor" if condicion_cierta() else "otro_valor"
  • reducciones:
    my_numbers = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
    even_number_list = [num for num in my_numbers if num%2 == 0]
 
  • development/python/aberraciones.1710250072.txt.gz
  • Darrera modificació: 12/03/2024 06:27
  • per mate