How do I get the name of an object or list?

how do I get the name of an object that does not have a _ _ name__ attribute, such as a list?
eg. There are now three lists, each with three small strings (not repeated). Use these small strings to match a long string, and if it does, return the name of the list to which the string belongs to the first match. if it doesn"t match, return "not matched"?

-sharp3
AAA = ["aa", "a1", "a2"]
BBB = ["bb", "b1", "b2"]
CCC = ["cc", "c1", "c2"]
-sharp
s1 = "asda2"
s2 = "bbbbb"
s3 = "zzzzz"

then S1 should be able to return "AAA", S2 should be able to return "BBB", and S3 should be able to return "not matched to".

Please don"t hesitate to give advice ~ ~ Thank you

Mar.13,2021

can save the nation by curve

{
"AAA" : ["aa", "a1", "a2"],
"BBB" : ["bb", "b1", "b2"],
"CCC" : ["cc", "c1", "c2"],
}
Menu