Python's ':' equivalent in mathematica

I need to translate these two lines to mathematica from python

 gamma = np.array([u/np.linalg.norm(u) for u in x[:y]])
beta = np.array([u/np.linalg.norm(u) for u in x[y:]])


where y is a number.

• I guess ":" translates to ";;", a.k.a. Span. Mar 24 '21 at 13:10
• There are two off-by-one bugs possible here: Python a[x:y] means taking elements x to y-1, where the first element is element zero. Mathematica a[[x;;y]] means taking elements x to y, where the first element is element 1. So Python a[x:y] should be written as a[[x+1;;y]] in Mathematica. Mar 24 '21 at 13:14

: in python denotes ranges of array elements, and is equivalent to Span (;;) as noted by Henrik Schumacher's comment above
gamma = Norm/@x[[;;y-1]]