Advertisement



< Prev
Next >



Python - String splitlines() Method





The splitlines() string method is used to split the content of the invoked string at the occurrence of each newline character i.e. \n in it. The splitlines() method returns a list of split values.




Signature of splitlines() method


# The signature of splitlines() method 
  
splitlines(keepnewline)


Parameters Description
keepnewline
This optional parameter is used to specify a bool value where -
-- The value True specifies that the newline character \n should be included as a part of a split.
-- The value False specifies that the newline character should not be included in the split.

-- The default value of this parameter is False.






Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement

Notifications



Please check our latest addition

PYTHON


Advertisement