I want these 2 string variables in my other string :
{"prompt":"**String 1**","completion":" **String 2**"}
The problem is I run into a problem because of the multiple quotations.
file_object = open('Sample.txt', 'a')
x = "hello"
y = "hi"
file_object.write('{"prompt":"{}","completion":" {}"}'.format(x,y))
This is what I have tried but It doesn't work.
My intended output : {"prompt":"hello","completion":" hi"}