features = [1,2,3,4]
retDataSet=[]
reducedFeatVec=features[:0]
print(reducedFeatVec)
reducedFeatVec.extend(features[1:]) #从1开始往 后加进来
print(reducedFeatVec)
retDataSet.append(reducedFeatVec) #变为向量
print(retDataSet)
python之featVec[:axis]|extend|append
原文:https://www.cnblogs.com/judejie/p/9042681.html