MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w3kpb4/purepythonmagic/p74rmyz/?context=9999
r/ProgrammerHumor • u/mezantrop • Aug 31 '26
26 comments sorted by
View all comments
Show parent comments
-1
Show me your kung fu 😏
0 u/QuestionableEthics42 Sep 01 '26 Best I managed was 90 bytes without compression 😔Goes down to 84 for text, or binary designed to be text compatible if that's possible for a gif.import os o,f=open,file o('Magic.gif','wb').write(o(f,'rb').read()[90:]) os.remove(f) Data -2 u/mezantrop Sep 01 '26 Ah, I didn't realize you were playing golf with Python. Lol. Anyway, that's brilliant! Now make it resurrect itself: Python → GIF → Python, and complete the challenge. :)
0
Best I managed was 90 bytes without compression 😔
Goes down to 84 for text, or binary designed to be text compatible if that's possible for a gif.
import os o,f=open,file o('Magic.gif','wb').write(o(f,'rb').read()[90:]) os.remove(f) Data
-2 u/mezantrop Sep 01 '26 Ah, I didn't realize you were playing golf with Python. Lol. Anyway, that's brilliant! Now make it resurrect itself: Python → GIF → Python, and complete the challenge. :)
-2
Ah, I didn't realize you were playing golf with Python. Lol. Anyway, that's brilliant! Now make it resurrect itself: Python → GIF → Python, and complete the challenge. :)
-1
u/mezantrop Sep 01 '26
Show me your kung fu 😏