-1

i just want to write a string to a .txt file with part of this one in bold.

Is there any way to do it?

An example of what i am asking for:

2021/02/19: this is an example

andyio
  • 132
  • 6

2 Answers2

0

You cannot use any type of markdown in a .txt file, using python or not. You might want to check other files extensions such as .md files.

Gugu72
  • 542
  • 5
  • 24
0
test = 'teste.rtf'
out_file = open(test,'w')
out_file.write("""{\\rtf1
This is \\b Bold  \\b0\line\
}""")
out_file.close()
Gusman
  • 37
  • 8