📁 코딩테스트 준비/Python

[자료구조/python]백준 9093번 단어 뒤집기

박개봄 2023. 4. 30. 16:17
728x90
n=int(input())

arr=[]

for _ in range(n):
  arr=list(input().split())
  for i in arr:
    print(i[::-1],end=' ')
    #슬라이싱 이용, -1(음수값)은 역순출력
    #
  print() #문장마다 줄바꿈
728x90