Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

access dynamicall to name attribute python


obj = myobject()
i = 7
date7 = getattr(obj, 'date%d' % i) # same as obj.date7

Source by coders911.org #
 
PREVIOUS NEXT
Tagged: #access #dynamicall #attribute #python
ADD COMMENT
Topic
Name
5+5 =