I have a list that follows the format :
message = [sender, receiver, message_name]
I have to loop through all my messages stored in my message_stack list and assess for each message whether it's name is valid (i.e if its name is in the valid_names list)
For the moment I have :
for message in message_stack:
if message[2] not in valid_names:
print("Error : wrong name.")
The iterator message has a relevant name but is there a way to make message[2] a bit clearer regarding the face that it is a message name ?
Thanks !