In this program the output is only showing key but what can i do so that both key and value save in data.txt file

```
myfile = open(r'data.txt','w')
d = {'studentName':'ABC''\n','RollNo':'2'}
myfile.writelines(d)
myfile.close()

```