0

I want to write string to file in python

that write varuables in the string but print this { like string too.

    a = 5
    with open('bootstrap_2.json', 'w') as file:
        file.write(f'{ boot , {a}')

Desired output:

   { boot , 5

How can I undo the meaning of the first { that it will be normal string? thanks!

GeekEfrat
  • 1
  • 1
  • 2

0 Answers0