Learning Python

sábado, 4 de enero de 2025

filtering a list with other list

>>> l=[a for a in l if a not in ['Casa',0]]

>>> l

['Television', 10, 'Pistola']

 

>>> l=[a for a in l if a not in ['Casa',0]]

>>> l

['Television', 10, 'Pistola']


Publicado por Ambiorix Rodriguez en 17:00
Enviar por correo electrónicoEscribe un blogCompartir en XCompartir con FacebookCompartir en Pinterest

No hay comentarios:

Publicar un comentario

Entrada más reciente Entrada antigua Inicio
Suscribirse a: Enviar comentarios (Atom)

Archivo del blog

  • ▼  2025 (9)
    • ►  mayo (1)
    • ►  abril (1)
    • ►  marzo (1)
    • ►  febrero (2)
    • ▼  enero (4)
      • using cases with dict
      • https://cloud.google.com/video-intelligence/docs/s...
      • Python Range
      • filtering a list with other list
  • ►  2024 (67)
    • ►  diciembre (5)
    • ►  noviembre (5)
    • ►  octubre (12)
    • ►  septiembre (14)
    • ►  agosto (14)
    • ►  julio (11)
    • ►  junio (6)
  • ►  2023 (3)
    • ►  octubre (1)
    • ►  marzo (1)
    • ►  febrero (1)
  • ►  2022 (1)
    • ►  julio (1)
  • ►  2021 (2)
    • ►  junio (1)
    • ►  marzo (1)
  • ►  2020 (2)
    • ►  julio (1)
    • ►  febrero (1)
  • ►  2019 (7)
    • ►  agosto (1)
    • ►  julio (3)
    • ►  mayo (1)
    • ►  marzo (2)
  • ►  2018 (57)
    • ►  diciembre (3)
    • ►  noviembre (1)
    • ►  octubre (1)
    • ►  junio (2)
    • ►  abril (1)
    • ►  marzo (5)
    • ►  febrero (3)
    • ►  enero (41)
Tema Sencillo. Con la tecnología de Blogger.