How can I remove a trailing newline?

What is the Python equivalent of Perl’s chomp function, which removes the last character of a string if it is a newline?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)