+ 2
why I'm getting false as an answer and here it's true?
print(range(20) == range(0,20))
4 Respuestas
+ 1
I think it can depends on the version of python you use. On this application (python 3), the result is True witch makes sense. On witch version of you have false ?
+ 1
Im using Python 3
Remember to include the "list" function before the "range" function.
Such as: print (list (range (20)) == list (range (0,20)))
0
range 20 counts from 0 to 19 where range (0,20) counts from 0 to 20. syntax definition
0
1) It is also False on QPython 3 for Android, strangely enough ... (?????)
1b) It is true on Python 3.6.0, (Windows) 2.x on Android
2) Indeed, it is true if I insert a list(.
Conclusion: bug in QPython 3.