DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
2+7 =
Submit