Oct-29-2019, 12:38 PM
Hello,
I'm using Python 3.7.0 32-bit and wanted to print some variables with the format syntax
The variables are :
while in two lines the result is what I expected :
I'm using Python 3.7.0 32-bit and wanted to print some variables with the format syntax
The variables are :
client_address: ('192.168.167.200', 49706) message['FrameNumber']: 396The code:
print('Accepted new connection from {}:{} {}'.format(*client_address,client_address[1],message['FrameNumber']))gives the result :
Output:Accepted new connection from 192.168.167.200:49706 49706
Why is there 2 times the value 49706 ?while in two lines the result is what I expected :
print('Accepted new connection from {}:{}'.format(*client_address,client_address[1])) print('frame:{}'.format(message['FrameNumber']))
Output:Accepted new connection from 192.168.167.200:49706
frame:396