why is python string split() not splitting

split does not modify the string. It returns a list of the split pieces. If you want to use that list, you need to assign it to something with, e.g., r = r.split(' ').

Leave a Comment