Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python string to list without split

sentence = 'This is a sentence'
split_value = []
tmp = ''
for c in sentence:
    if c == ' ':
        split_value.append(tmp)
        tmp = ''
    else:
        tmp += c
if tmp:
    split_value.append(tmp)
Comment

PREVIOUS NEXT
Code Example
Python :: pyqt5 buttons 
Python :: python newton raphson 
Python :: iterating over lines in a file 
Python :: partition python 
Python :: what is gui in python 
Python :: how to make a calculator 
Python :: no module named 
Python :: how to create multiple dictionaries in python 
Python :: python boto3 put_object to s3 
Python :: python update dict if key not exist 
Python :: python write error to file 
Python :: flatten dict with lists as entries 
Python :: string without space pythonm 
Python :: extract text from image python without tesseract 
Python :: numpy vs tensorflow 
Python :: camp cretaceous.com 
Python :: python daemon 
Python :: python random distribution 
Python :: scipy cdf example 
Python :: number pattern program in python using for loop 
Python :: discord.py 8ball 
Python :: hur många partier sitter i riksdagen 
Python :: david dobrik 
Python :: python returning rows and columns from a matrix string 
Python :: arcpy select visible raster 
Python :: access dynamicall to name attribute python 
Shell :: lumen run command 
Shell :: remove all docker iamges commandl 
Shell :: sudo: unzip: command not found 
Shell :: choco list installed 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =