[python] sep=":"

Robin·2022년 9월 21일

Python

목록 보기
8/11

sep 는 분류기호(seperator)를 의미한다.

(ex) print(a, b, sep=':') 를 사용하면 콜론 ':' 기호를 사이에 두고 값을 출력한다.

입력 3:16
출력 3:16

a, b = input().split(":")
print(a+":"+b)

or

a, b = input().split(":")
print(a, b, sep=":")
profile
Always testing, sometimes dog walking

0개의 댓글