Splitting strings : String Split : String PYTHON examples


PYTHON examples » String » String Split »

 

Splitting strings


Splitting strings


string1 = "A, B, C, D, E, F"

print "String is:", string1
print "Split string by spaces:", string1.split()
print "Split string by commas:", string1.split"," )
print "Split string by commas, max 2:", string1.split",")
print


           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo String
» String Split


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0