Scroll Down to See All▾
absaiterallanextanyasciibinboolbreakpointbytearraybytescallablechrclassmethodcompilecomplexdelattrdictdivmodenumerateevalexecfilterfloatformatfrozensetgetattrglobalshasattrhashhelphexidinputintisinstanceissubclassiterlenlistlocalsmapmaxmemoryviewminnextobjectoctopenordpowprintpropertyrangereprreversedroundsetsetattrslicesortedstaticmethodstrsumsupertupletypevarszipclear_(dict)clear_(list)clear_(set)copy_(dict)copy_(list)copy_(set)fromkeysgetitemskeyspop_(dict)pop_(list)pop_(set)popitemsetdefaultupdatevaluescount_(tuple)count_(list)count_(str)index_(tuple)index_(list)index_(str)adddifferencedifference_updatediscardintersectionintersection_updateisdisjointissubsetissupersetremove_(set)remove_(list)symmetric_differencesymmetric_difference_updateunionupdateclosefilenoflushisattyreadreadablereadlinereadlinesseekseekabletelltruncatewritablewritewritelinesappendextendinsertreversesortcapitalizecasefoldcenterencodeendswithexpandtabsfindformatisalnumisalphaisasciiisdecimalisdigitisidentifierislowerisnumericisprintableisspaceistitleisupperjoinljustlowerlstripmaketranspartitionreplacerfindrindexrjustrpartitionrsplitrstripsplitstartswithstripswapcasetitletranslateupperdirzfillFunction Details: splitlines
Description
Returns a list of the lines in the string, breaking at line boundaries.
Extended Description
splitlines is a Python string method that splits string on line boundaries into a list of lines. Belongs to string partitioning family with split and rsplit, but specializes in line-based splitting. Works with strip for clean text processing and join for line reconstruction. Handles universal line endings (
,
,
). Optional keepends parameter preserves line terminators. Especially useful for processing text files, log parsing, and multiline string manipulation. Common in file I/O operations, text processing, and line-by-line analysis. Returns list of lines maintaining source format.
Read More about splitlines from Python Documentation
Function Signature
Module: builtins
Class: str
Parameters
Parameter List
- keepends: bool
Return
Return Type
List[str]