compare tag

12 questions


1 answers
77 views
0
Python comparative computation problem

class Fraction: def __init__(self, num, denom): self._num = num self._denom = denom def __repr__(self): return str(self) def __str__(self): return str(self._num) + / + str(self._denom) def __gt__(...

1 years ago

2 answers
64 views
0
It's a question about the Python list

Hello. I have a question while studying comparing two lists in Python.num_1=[2,8,3,4,5]num_2=[4,6,3,1,3]print(num_1<num_2)I wrote and executed the code like this, and True was printed. By the way, ...

1 years ago
« - 2 -

© 2024 OneMinuteCode. All rights reserved.