As we went through before, negative index numbers of a string start at -1, and count down from there until we reach the beginning of the string. How to split a string in Python â Python Principles Python regex split operations Table of contents How to use re.split () function Syntax How to Compare Strings in Python September 20, 2020. So you can think of a line as a string. commas, semicolon, quotes, or slashes). 1) sep parameter. 1. Python Split String by New Line - Python Examples Accordingly the split happens. explode Number of Parameters it takes â 2 (Both are optional) Return Type â Python List; Syntax & Parameters of split() Method. Count Words in String in Python How To Split