Splitting a string using specified delimiter in python!
I have a string like “hey_john!_it’s_your_arena!” I want it to be printed as “hey john! it’s your arena!” (without quotes) using python.
You can use split(delimiter) method to split it into pieces and join them afterward. you may use the following code snippet
strr = "hey_john!_it's_your_arena!" strr_splitted = strr.split('_') for word in strr_splitted: print(word), #print(strr_splitted)