The difference between 'print()' and 'printPlain()'

You might have noticed that the functions print() and printPlain() are used for printing the output on the terminal. Here's the difference:

  • Use print() when you just want to print the output on the terminal

    • All styles are applied as usual in this case

  • Use printPlain() when you also want to share the output

    • For example: sending it via chat or saving it to a file

    • Styles like text- and background-colors and font styles are not applied in this case

Last updated