I'm working on Python Socket programming and I have a problem with the send() function. I'm following this: Python socket network programming
# send a thank you message to the client.
c.send('Thank you for connecting')
# Close the connection with the client
c.close()
but I get this error:
Traceback (most recent call last):
File "*.py", line 27, in <module>
c.send('Thank you for connecting')
TypeError: a bytes-like object is required, not 'str'