python hello world

学习大多数的编程语言时,基本上都绕不开 hello world

那么python的hello world呢,刚刚在codewars上看到了几个。

切片

def greet():
    return 'dlrow olleh'[::-1]
def greet():
    return 'The most beautiful hello world'[19:]

 编码

greet = 'uryyb jbeyq'.encode('rot13').__str__
def greet():
    import zlib,base64
    return zlib.decompress(base64.b64decode('eJzLSM3JyVcozy/KSQEAGgsEXQ=='))

 这个没看下去,但是看起来很高大上的样子

def greet():
    pizza = 0
    if (len("Illuminati") - 1) % 3 == 0 and (len("Bush did 9/11") % 9/11 == 0):
        for n in range(len("Illuminati")*len("Bush did 9/11")):
            pizza += n * 5 / len("pizza")
        if pizza != 0 and pizza % len("pizza") == 0:
            string = "hello "
            if string != "hello world":
                second_string = ""
                for char in range((len("hello world")-len(string))+1):
                    if char == 1:
                        second_string += 'w'
                    elif char == 2:
                        second_string += 'o'
                    elif char == 3:
                        second_string += 'r'
                    elif char == 4:
                        second_string += 'l'
                    elif char == 5:
                        second_string += 'd'
                if (string + second_string == "hello world") and ((len("Naughty Santa Claus") - len(string)) % 9/11 == (len("Illuminati") % 2)):
                    try:
                        '420-topkek!!! * 696969 &&{lolol}' / 2 / 3 / 4 / 5 / 6 / list("dubs")
                    except:
                        print__ = 'hello kitty'
                        if 'kitty' in print__:
                            kek = print__.replace('kitty', 'world')
                            return kek
                        else:
                            return 'wew lad' * 3
                else:
                    kek = 69
                    for x in range(1000):
                        kek += x * 4.20
                    return kek
        else:
            pass
    else:
        if "Bush probably didn't do 9/11 confirmed gg" == True:
            return "TOP KEK!!!"

下班,其他的不看了。。。 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值