Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこのコードを持っています
keys = {'speed','temp'}
私は次のような変数を持っています
object.subobj.speedとobject.subobj.temp
object.subobj.speed
object.subobj.temp
どうすればループできますか
for key in keys print object.subobj.key
for key in keys: print getattr(obj.subobj, key)