Range | Sololearn: Learn to code for FREE!

0

Range

when i print this num=list(range(3,8)) print(num) print(range(20)==(0,20)) i get [3,4,5,6,7] False but why is it False it should be True or am i missing something?

2/14/2017 12:44:47 PM

Naschkatzification

3 Answers

New Answer

+1

(0,20) is not range(0,20)

+1

True i tried x=list(range(20)) y=list(range(0,20)) if y==x: print(True) and it worked I should have read correctly ty for your answer

+1

my pleasure :)