개요
- Python len()
- 파이썬 len()
문자열의 길이
문자열
str = "Hello"
print( len(str) ) # 5
원소의 개수
리스트
lst = ['Alice','Bob','Carol']
print( len(lst) ) # 3
튜플
t = ('Alice','Bob','Carol')
print( len(t) ) # 3
str = "Hello"
print( len(str) ) # 5
lst = ['Alice','Bob','Carol']
print( len(lst) ) # 3
t = ('Alice','Bob','Carol')
print( len(t) ) # 3