From be0fcf5dc3bcf82e128aff4afe89d52c587056e3 Mon Sep 17 00:00:00 2001 From: Mindiell Date: Mon, 18 Sep 2023 21:18:14 +0200 Subject: [PATCH] reduced rikiki again and again --- rikiki/README.md | 1 + rikiki/rikiki.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rikiki/README.md b/rikiki/README.md index 69b9f00..9802893 100644 --- a/rikiki/README.md +++ b/rikiki/README.md @@ -9,6 +9,7 @@ Fun fact: Rikiki source code is *three times smaller* than this readme file. * First version : 532 bytes * Second version : 507 bytes * Third version : 477 bytes +* Fourth version : 469 bytes # Usage diff --git a/rikiki/rikiki.py b/rikiki/rikiki.py index aeb3b7e..48909db 100755 --- a/rikiki/rikiki.py +++ b/rikiki/rikiki.py @@ -9,5 +9,5 @@ c=s[0] if s else o(p).read() l[p]=[x[0] for x in r.findall(k,c)] h=r.sub(k,v,c,r.M) j.dump(l,o("b","w")) -print(f'\n\n
{h}
') -[n==p and print(r.sub(k,v,m)) for m in l for n in l[m]] \ No newline at end of file +[n==p and print(r.sub(k,"\n\n"+v,m)) for m in l for n in l[m]] +print(f'
{h}