Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
python get object attribute by string
Alex S
Programming language:
Python
2021-07-08 05:27:03
0
Q:
python get object attribute by string
GARY BROOKS
Code:
Python
2021-07-17 01:27:39
x = getattr(t, 'attr1') setattr(t, 'attr1', 21)
1
Tags
string
object
python
get
attribute
Related
attribute error python
python class get attribute by name
python3 check if object has attribute
string representation of object python
object value python
python object with attributes
python get attributes of object
python object getattr
scrapy get inside attribute value
New to Communities?
Join the community