formatting string in python with class members
python
Solution
What you probably are looking for is
'this is {0.a}'.format(self)
'this is {.a}'.format(self)
'this is {o.a}'.format(o=self)
'this is {self.a}'.format(self=self)
Note, however, that you are missing at least a method in your class.
Directly under the class scope there is no such thing as `self`.
Problem
Consider this code: ``` class Foo: def geta(self): self.a = 'lie' return 'this is {self.a}'.format(?) ``` What should I write instead of the question mark so that the string will be formatted correctly?