문자열 다루기


문자열 다루기

타입 변환 str (xx) int (xx) float (xx) ord (xx) hex (xx) oct (xx) tuple (xx) set (xx)list (xx) dict (xx) 참고. trump_tweets_zip = list(zip(trump_tweets['Date'], trump_tweets['Text'])) ※ zip (a, b) a와 b모두 int형이 될수 없음 int는 숫자로 인덱싱이 불가하기 때문에 123을 인덱싱해서 1, 2, 3과 같이 인덱싱으로 호출 할 수 없음. 그래서 반복 순환이 안되기 때문에 iterration이 안된다고 함 즉, iterrable 데이터는 member를 하나씩 변환(처리) 가능한 데이터를 말함 단어/문장 다루기 string_xx.lower() string_xx.upper() string_xx.startswith(‘s’) ‘ss’가능 string_xx.split() 공백(null) 문자 ( ‘ ‘, ‘\n’, ‘\t’) 기준 분리 string...



원문링크 : 문자열 다루기