Startup Data scientist Blog

データ分析系のテック情報を発信します

Python sample code: リスト内の再表記

Python Sample code リスト内の再表記

a = [1,2,3,4,5,6,7,8,9,10]
print('The current data is :',a)
print('リスト内の数 :',len(a))
print('リストの最大値 :',max(a))
print('リストの最小値 :',min(a))

>>>

he current data is : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
リスト内の数 : 10
リストの最大値 : 10
リストの最小値 : 1