vendredi 6 mars 2015

python test if substring in all item in a list

I want to do like all all() like comparison to test if my substring is in every element in the list.


Some dummy data:


let my_list = ['~/.tmp/myproject/filea', '~/.tmp/myproject/fileb']


I want to test if .tmp/myproject/ is in every item in this list.


Aucun commentaire:

Enregistrer un commentaire