无参:应用场景仅仅只是执行一些操作,比如与用户交互,打印
有参:需要根据外部传进来的参数,才能执行相应的逻辑,比如统计长度,求最大值最小值
空函数:设计代码结构

def my_max(x,y):
    if x > y:
        # print(x)
        return x
    else:
        # print(y)
        return y

res=my_max(1,2)
print(res)

res=max(1,2)
print(res)

def foo():
    print('-=----')
    return 123
    print('-=----')
    print('-=----')
    print('-=----')
foo()

def main():
while True:
sql=input('>>: ').strip()
if not sql:continue
cmd_info=sql.split()
cmd=cmd_info[0]


if cmd == 'select':
select(cmd_info)



main()

 

 

相关文章:

  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2021-08-19
  • 2021-08-30
  • 2021-08-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
  • 2021-09-01
相关资源
相似解决方案