How to add CRLF to a Python string

How to add CRLF to python string. It's simple. Just add \r\n to the string.

Adding CRLF to end of python string


my_str = "This is my string. There are many like it, but this one is mine.\r\n"

Joining list of string with CRLF


my_strings = [
    'string_1',
    'string_2',
    'string_3',
    'string_4',
    'string_5',
    'string_6',
    'string_7',
]

my_str = '\r\n'.join(my_strings)