Answers for "python access class variable by string"

0

python access class variable by string

# name must be a string
# default is optional
getattr(object, name, default)
Posted by: Guest on September-28-2021

Code answers related to "python access class variable by string"

Python Answers by Framework

Browse Popular Code Answers by Language