diff --git a/README.md b/README.md
index 31c1482fb2862e8f94e9e7e1c37e6ed23d11ba8b..7ee45d495aaa32fc38301b6b173dd81a582fe588 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,13 @@ import machine
 import time
 
 # inject
-print(f"\3f=open('main.py', 'wb')\nf.write({open('main.py', 'rb').read()})\nf.close()\nimport machine\nmachine.reset()")
+with open("main.py", "rb") as f:
+    print("\x03", end="")
+    print("f = open('main.py', 'wb')")
+    print("f.write(")
+    print(f.read())
+    print(")")
+    print("f.close()")
 
 # blink
 p = machine.Pin(25, machine.Pin.OUT)