What is the output of this python code? : So the code is:

    X = range(4, 7)
    Y = range(2)
    X[2] = Y
    print X[2][0]
    print X[2][1]
    
    X[2][0] = 9
    print Y[0]
And the output is

    0
    1
    9
What exactly is the code doing to get that output? Also if the code looked like 

    X = range(4, 7)
    print X[-1]
Then what would the output be because I'm confused about what negative values do. 