본문 바로가기
Python 배우기

string_multiplication.py

by 노화방지 Anti-aging Hairstyle 2016. 3. 6.
반응형
hello = "hello"
ten_of_hellos = hello * 10
print(ten_of_hellos)

산출물 (Output)
hellohellohellohellohellohellohellohellohellohello

* Python은 string-by-number multiplication를 지원합니다(but not the other way around!).


반응형

'Python 배우기' 카테고리의 다른 글

negative_indexing.py  (0) 2016.03.06
string_indexing.py  (0) 2016.03.06
concatenation.py  (0) 2016.03.06
비교 연산자 comparison_operators.py  (0) 2016.03.06
boolean_operators.py  (0) 2016.03.06

댓글