Separating similar values froom array in python : I have numpy array with values 0,1,2. I want to separate then in different arrays and plot them. How can i do that??

    for i in range(2):
    if i==0
    z = [i]
    elsif i==1
    y= [i]
    else
    w = [i]

this is what i tried