파이썬 공부시작 담주 월요일부터 진짜 미친듯이 공부하자!!
이번주까지는 코딩적응기간으로 잡고ㅋㅋㅋㅋㅋ


python 명령어
-len : 문자열의 길이를 계산

Ex.code)
text = 'abcdefg'
result = len(text)
print(result)

-문자열 범위지정해서 출력
text = 'abcdefg'
result = text[3:7][시작점 : 끝점]
※파이썬은 숫자를 0부터 시작!!

-split 문자열 쪼개기
Ex.code)
test = ubeom@naver.com
result = test.split('@')[1].split('.')[0]
print(result)

profile
코린이 성장기

0개의 댓글