Skip to main content
3 of 5
added 163 characters in body
ovs
  • 60.6k
  • 3
  • 47
  • 161

Python 3.6, 96 94 (96-2) bytes

a,b=0,1
f=open(__file__,"r+");s=f.readlines()[1];f.seek(0);f.write(f"a,b={b,a+b}\n"+s);print(b)

hardcoding the filename would save 5 bytes (91 bytes):

a,b=0,1
f=open("f","r+");s=f.readlines()[1];f.seek(0);f.write(f"a,b={b,a+b}\n"+s);print(b)
ovs
  • 60.6k
  • 3
  • 47
  • 161