Answers for "how to strip a list in python"

0

how to strip a list in python

list1 = ["a  ", "  b ", " c"]

[i.strip() for i in list1] # ['a', 'b', 'c']
Posted by: Guest on August-23-2020

Code answers related to "how to strip a list in python"

Python Answers by Framework

Browse Popular Code Answers by Language