나의 작은 valley
[Python] Namedtuple 본문
728x90
from collections import namedtuple
Student = namedtuple('Student', ['name', 'age', 'DOB'])
S =Student('붕옥아이젠', '20', '112')
print(S[1])
print(S)
print(S.name)
728x90
'Computer Science > [Python] 문법 정리' 카테고리의 다른 글
[python] 일급함수, 내적함수, 데코레이터 (0) | 2023.01.30 |
---|---|
[Python] PyGame을 이용한 게임 프로그래밍 (3) (0) | 2022.09.14 |
[Python] 강화학습 (0) | 2022.09.03 |
[Python] 확률적 경사하강법(Stochastic Gradient Descent) (0) | 2022.08.31 |
[Python]지도학습(Supervised Learning) - 회귀(Regression) (0) | 2022.08.30 |
Comments