
백준 / 11718번 / 그대로 출력하기 / python 파이썬
·
코딩테스트/백준 (python)
문제 : https://www.acmicpc.net/problem/11718 코드 import sysword = sys.stdin.readlines()for w in word: print(w.rstrip())readlines()를 사용해 여러 입력을 한 번에 받는다. 각 문장 마지막에 개행문자 \n이 함께 저장되므로 rstrip을 사용해 개행문자를 제거해준다.