i have 2 numbers but don't know which one is bigger how to specify range in python | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

i have 2 numbers but don't know which one is bigger how to specify range in python

for j in range(d_j, s_j): if self.matrix[d_i][j].value == 'B': return False should I add "if" to check which one is bigger(to navigate from smaller to bigger)?

20th Feb 2022, 8:13 AM
farkhondeh
1 Réponse
+ 2
If there are only 2 numbers then why range? if a > b: print ("a is bigger") else: print ("b is bigger")
20th Feb 2022, 8:26 AM
A͢J
A͢J - avatar