Suppose we have three sides. We have to check whether these three sides are forming a triangle or not.
So, if the input is like sides = [14,20,10], then the output will be True as 20 < (10+14).
To solve this, we will follow these steps −
Let us see the following implementation to get better understanding −
def solve(sides): sides.sort() if sides + sides <= sides: return False return True sides = [14,20,10] print(solve(sides))