Discuss / Python / 还有问题

还有问题

Topic source

Waslay__

#1 Created at ... [Delete] [Delete and Lock User]

应该吧tcplink函数放在while循环上面,要不然会报无tcplink这个参数故障

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

可以把while写到main()里面:

def main():
    while...

def tcplink():
    ...

main()

最后一行调main(),可以让各个函数定义顺序无关


  • 1

Reply