Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get string until character python

s = "first_second"
s.split('_')[0] # Split the string on '_' return the first part. 
>>> 'first'
 
PREVIOUS NEXT
Tagged: #string #character #python
ADD COMMENT
Topic
Name
2+7 =