I'm a CS student learning network programming. I'm using python to develop a chat application using the server-client network functions like socket function, bind function, receive function and etc. But I encounter this problem in the server code which I don't understand since I have never learnt python programming language before. Could you help me?
The error occurs at print(f'Received encrypted message from {user["data"].decode("utf-8")}: {encMsg["data"].decode("utf-8")}')
# Get user by notified socket, so we will know who sent the message
user = clients[notified_socket]
print(f'Received encrypted message from {user["data"].decode("utf-8")}: {encMsg["data"].decode("utf-8")}')
# Iterate over connected clients and broadcast message
for client_socket in clients:
# But don't sent it to sender
if client_socket != notified_socket: