最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Is it possible to write python code with only symbols? (like jjencode for JavaScript) - Stack Overflow

programmeradmin1浏览0评论

I’m trying to make a tool that encode python code to runnable code with only symbols. Now i can create any int (because bool is a subclass of int, you can make True with [[]]>[] and True+True == 2, True-True+True == 1, True-True == 0…), and use % format ("%c"%97 == "a", You can convert ascii code to char with %c format) to make any chars. Here’s currently my progress:

_="c";__=exec;__((("%"+_)%((([[]]>[])+([[]]>[])…

But, I still can’t make "c" and exec function with only symbols. so, if you know how to make "c" or exec with only symbols, or how to write symbol-only python code with other way, please can you tell me? …And sorry for my bad English, and i know probably here’s not a place for ask question like this, but i don’t know other places to ask question sorry.

I tried to make <class 'str'> <- this type object with only symbols(because str(str)[1] == "c"), but i couldn’t find way to do that.

发布评论

评论列表(0)

  1. 暂无评论