+ 1

Python question, in python3 this two symbols i don't understand (<= , >= ) please give me examples and explain also.

<= , >=

7th Jun 2019, 8:30 AM
Rupak Barman
Rupak Barman - avatar
3 Réponses
+ 3
<= means ‘less or equal‘ >= means ‘greater or equal’ a=7 if a <= 10 # result True so all values up to and including 10 give True. a=13 if a <= 10 # result False
7th Jun 2019, 9:57 AM
Lothar
Lothar - avatar
+ 1
Let me give you some equivalents for them: x<=y means: x<y or x==y x>=y means: x>y or x==y
7th Jun 2019, 9:37 AM
ΛM!N
ΛM!N - avatar
0
If you understand < and >, then it should not be hard to understand <= and >=. Their only difference is that <= and >= returns True, when compared values are equal, unlike < and >.
7th Jun 2019, 9:43 AM
Seb TheS
Seb TheS - avatar