0

Why we put "!r" inside the code ?

Here is the code I found, but I can't understand why there's "!r" inside, and what's it meaning: class Pizza: def __init__(self, ingredients): self.ingredients = ingredients def __repr__(self): return f'Pizza({self.ingredients!r})' # here, there's a "!r" after "self.ingredients"

9th Apr 2019, 4:24 PM
Joe Lishuai Lin
Joe Lishuai Lin - avatar
1 Answer
9th Apr 2019, 4:54 PM
dρlÏ…Ń•ÏlÏ…Ń•
dρlÏ…Ń•ÏlÏ…Ń• - avatar