python convert string to list of lines