Answers for "split a string based on with delimiter in python"

25

split string in python

def split(word): 
    return [char for char in word]  
      
# Driver code 
word = 'geeks'
print(split(word)) 

#Output ['g', 'e', 'e', 'k', 's']
Posted by: Guest on December-07-2019
0

spliting the text to lines and keep the deliminaters python

raw_lines = re.split('(?<=!)|(?<=.)|(?<=?)', text)
Posted by: Guest on September-05-2021

Code answers related to "split a string based on with delimiter in python"

Python Answers by Framework

Browse Popular Code Answers by Language