I am new to this field, this script is used to get 80% of data randomly into training list, and the rest 20% in testing list. This script works, but I have a few questions about why it works.
If len(data) is 1000, then randn(1000) will generate 1000 random number with normal distribution. What I do not understand are:
1)I test myself such as [1,2,3,4,5,6,7,8,9,10]<5 I got an error,because the left operator is a list.But why check=a<0.8 legal, a should be a list of 1000 elements?

```
import pandas as pd
import numpy as np 
data = pd.read_csv('E:/Personal/Learning/Datasets/Book/Customer ChurnModel.txt')
len(data)
a=np.random.randn(len(data))
check=a<0.8
training=data[check]
testing=data[~check]

```