List comprehension with duplicated function call – stackoverflow.com

I want to transform a string such as following: ' 1 , 2 , , , 3 ' into a list of non-empty elements: ['1', '2', '3'] My solution is this list comprehension: print [el.strip() for ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "List comprehension with duplicated function call – stackoverflow.com"