implementing queue using python lists