Getattr use wildcard as name parameter python

I am trying to extract value from snmp trap oid got from mib, using getattr function in python.

getattr(evt,1.3.6.1.4.1.755.1.2.3.3.1.1.2

)when i started testing the using real trap OID is having two additional values at the end.

1.3.6.1.4.1.755.1.2.3.3.1.1.2.**1.2**

so is there a way i can use

getattr(evt,1.3.6.1.4.1.755.1.2.3.3.1.1.2.*)

I don't want to use the correct OID. it should work in all cases so i wanted to use a wild card. i tried it. but it's not working. If you know any alternatives please help.

Since getattr requires an exact name string, you may have to iterate a dir() and compare each to your pattern.