Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to separate elements in list python

>>> l = ['element1	0238.94', 'element2	2.3904', 'element3	0139847']
>>> [i.split('	', 1)[0] for i in l]
['element1', 'element2', 'element3']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #separate #elements #list #python
ADD COMMENT
Topic
Name
7+6 =