python占位符%s,%d,%r,%f,,conn, clie
python占位符%s,%d,%r,%f,,conn, clie
conn, client_addr = phone.accept()
print(conn)
print(client_addr)
print(‘got a new connection from %s‘ % (client_addr, ))
"""
<socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=(‘127.0.0.1‘, 8080), raddr=(‘127.0.0.1‘, 55925)>
(‘127.0.0.1‘, 65197)
got a new connection from (‘127.0.0.1‘, 65197)
"""
python占位符%s,%d,%r,%f
评论关闭