Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove too short strings from a list python

list = ["wow", "it will not be remove"]

list = [item for item in list if len(item)>=7]

print(list)

#========   Output   ==================================================
["it will not be remove"]
 
PREVIOUS NEXT
Tagged: #remove #short #strings #list #python
ADD COMMENT
Topic
Name
3+1 =