How to extract string without spaces into a list of words in Python

1 Answer

0 votes
import wordninja

s = 'PythonJavaPascalCobolC++'

lst = wordninja.split(s)

print(lst)
     
     
     
'''
run:
     
['Python', 'Java', 'Pascal', 'Cobol', 'C']
     
'''

 



answered Jan 14, 2020 by avibootz

Related questions

...