In Python 3.3 I am getting an error while executing this line:
print ("Message from server : ") + msg
where msg
is received data from server (Trying to do socket programming as you might guess)
In Python 3.3 I am getting an error while executing this line:
print ("Message from server : ") + msg
where msg
is received data from server (Trying to do socket programming as you might guess)
print()
returns None
in Python 3. So, you're trying to concatenate(or add) None
with msg
, which results in an error.
Try string formatting:
print ("Message from server : {}".format(msg))