Strip1 [파이썬] 문자열: upper, lower, slicing, split, replace, find, len, strip 문자열은 작은 따옴표 혹은 큰 따옴표 안에 넣어서 설정할수있다. in: x = 'Hello World' in: x out: 'Hello World' 문자열은 한줄로 이어서 작성할수있으며 줄바꿈 하지 않는다. 다만, 따옴표를 세개 붙여서 사용하면 여러줄로 작성 할수 있다. in: y = ''' hello world ''' in: y out: 'hello\nworld' in: print(y) out: hello world '+'연산자를 문자열에 사용하여 두개 이상의 문자열을 합칠수 있다. in: first_name = 'Mitch' in: last_name = 'Steve' in: first_name + last_name out: 'MitchSteve' 문자열 사이에 공백을 추가 할때는 따옴표에 공간을 둬서.. 2022. 4. 19. 이전 1 다음