xxxxxxxxxx
range(4)
#considers numbers 0,1,2,3
range(1, 4)
#considers numbers 1,2,3
range(1, 4, 2)
#considers numbers 1,3
range(4, 1, -1)
#considers numbers 4,3,2
xxxxxxxxxx
# Starts at 1 counts till 4-1
range(1, 4) # 1, 2, 3
# Starts at 3 counts till 0+1
range(3, 0, -1) # 3, 2, 1
# Starts at 1 counts till 11-1
range(1, 11) # 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
# starts at 10 counts till 0+1
range(10, 0, -1) # 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
# in python the first number is always inclusive
# and the last number is always exclusive