How To Traverse An Array In Python Low And Upper Bound