Use the \ escape character.
list_str = ["first_string", "\\nsecond_string"]
join_str = ",".join(list_str)
print(join_str)
Output: first_string,\nsecond_string
Use the \ escape character.
list_str = ["first_string", "\\nsecond_string"]
join_str = ",".join(list_str)
print(join_str)
Output: first_string,\nsecond_string