请问为啥可以运行,但是不显示啊
simple:class simple_main():
def logo():
print("_ _ _\n"
"| | (_) | | \n"
"| | ____ __ ___ ___ _ __ ___ _ _ __ ____ __ | | ___ \n"
"| |/ _ \| '_ ` _ \ / _ \ '_ \/ __| | '_ ` _ \| '_ \| |/ _ \\n"
" | | (_) | | | | | |__/ | | | \__ \ | | | | | | |_) | |__/\n"
"|_|\___/|_| |_| |_|\___|_| |_| |___/_|_| |_| |_| .__/|_|\___|\n"
" | | \n"
" |_| ")
def txt():
print("--------------------------------------------------")
txt = (str(input(">>>")))
print(txt)
test:
import simple
while True:
simple.simple_main.logo
为啥啊
simple.simple_main.logo()
调用不是要有括号吗 simple.simple_main.logo()
logo()调用, logo返回地址 本帖最后由 jackz007 于 2022-6-22 21:20 编辑
class simple_main():
def logo():
print("_ _ _\n"
"| | (_) | | \n"
"| | ____ __ ___ ___ _ __ ___ _ _ __ ____ __ | | ___ \n"
"| |/ _ \| '_ ` _ \ / _ \ '_ \/ __| | '_ ` _ \| '_ \| |/ _ \\n"
" | | (_) | | | | | |__/ | | | \__ \ | | | | | | |_) | |__/\n"
"|_|\___/|_| |_| |_|\___|_| |_| |___/_|_| |_| |_| .__/|_|\___|\n"
" | | \n"
" |_| ")
def txt():
print("--------------------------------------------------")
txt = (str(input(">>>")))
print(txt)
a = simple_main
a . logo()
a . txt() wp231957 发表于 2022-6-22 21:11
simple.simple_main.logo()
调用不是要有括号吗
az,日常大脑宕机
页:
[1]