我的博客

leetcode 可能是己亥年最有趣的比赛 - qqqqqqqqqqqqqqqy 的热身题 - 返回代码本身的函数 - python

目录
1
2
3
4
5
6
def q():
quotation = chr(0x22)
newline = chr(0x0a)
s = "def q():{0} quotation = chr(0x22){0} newline = chr(0x0a){0} s = {1}{2}{1}{0} s = s.format(newline, quotation, s){0} return s"
s = s.format(newline, quotation, s)
return s

参考知乎上的文章

我写的本次比赛的其他题目)

评论无需登录,可以匿名,欢迎评论!