For example :

lst = ['123','341','523'] 

And should be:

 lst = ['123','341'] 

'523' - not suitable because there is no '1' sign there

    1 answer 1

     lst = ['123','341','523'] lst = [str for str in lst if '1' in str] print(lst)