2017-03-17 3 views

답변

2

당신은 split을 시도 할 수 있습니다 :

>>> sent="Software Development = 1831" 
>>> sent.split("=")[0] 
'Software Development ' 
+0

고맙습니다. :) –

0
>>> str="Software Development = 1831" 

>>> str.split() 
['Software', 'Development', '=', '1831'] 

or 

>>> str.split("=") 
['Software Development ', ' 1831'] 
0

처음에 당신이 사이에 공백이 '=', 따라서 코드는

"= 1831 소프트웨어 개발"= 전송이

과 같아야합니다

답장 = sent.split ("=") [0] #space before와 after =

관련 문제