Answers for "python __repr__ meaning"

1

python __repr__ meaning

>>>x=4
>>>repr(x)
'4'
>>>str(x)
'4'
>>>y='stringy'
>>>repr(y)
"'stringy'"
>>>str(y)
'stringy'
Posted by: Guest on April-06-2020
0

python __repr__ meaning

>>>repr(y)
"'a string'"
>>>y2=eval(repr(y))
>>>y==y2
True
Posted by: Guest on April-06-2020

Python Answers by Framework

Browse Popular Code Answers by Language