Print “\n” or newline characters as part of the output on terminal January 28, 2023 by Tarik Use repr >>> string = "abcd\n" >>> print(repr(string)) 'abcd\n'