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

Python 3.6, 96 93 (95-2) bytes

a,b=0,1
f=open(__file__,"r+");next(f);f.write(f"a,b={b,a+b}\n{next(f)}{f.‌​seek(0)}");print(b)

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

a,b=0,1
f=open("f","r+");next(f);f.write(f"a,b={b,a+b}\n{next(f)}{f.‌​seek(0)}");print(b)

Saved some bytes thanks to @Artyer

ovs
  • 60.6k
  • 3
  • 47
  • 161