수업소개
여러개의 데이터를 정리정돈하는 도구인 리스트에 대해서 소개합니다.
강의
소스코드
1 2 3 4 5 6 7 8 9 10 11 12 13 | students = [ "egoing" , "sori" , "maru" ] grades = [ 2 , 1 , 4 ] print ( "students[1]" , students[ 1 ]) print ( "len(students)" , len (students)) print ( "min(grades)" , min (grades)) print ( "min(grades)" , max (grades)) print ( "sum(grades)" , sum (grades)) import statistics print ( "statistics.mean(grades)" , statistics.mean(grades)) import random print ( "random.choice(students)" , random.choice(students)) |