我试图使用^{
文档中给出的示例:
import click
@click.command()
@click.option('--count', default=3, help='Number of greetings.')
def hello(count):
"""Simple program that greets NAME for a total of COUNT times."""
for x in range(count):
click.echo('Hello')
if __name__ == '__main__':
hello()
我想做的是:
import click
@click.command()
@click.option('--count', default=3, help='Number of greetings.')
def hello(count):
"""Simple program that greets NAME for a total of COUNT times."""
for x in range(count):
click.echo('Hello')
return "hello hi"
if __name__ == '__main__':
print(hello())
“hello hi”不作为控制台上的输出返回。有人能告诉我怎么做到这一点吗?
目前没有回答
相关问题 更多 >
编程相关推荐