how to split string by \n code example Example: split string on '\n' python var = myString.splitlines()