코드
inStr, outStr="",""
count,i=0,0
inStr=input("문자열을 입력하세요 : ")
count=len(inStr)
for i in range(0,count) :
outStr +=inStr[count-(i+1)]
print("거꾸로 출력-->%s" % outStr)
결과값
inStr, outStr="",""
count,i=0,0
inStr=input("문자열을 입력하세요 : ")
count=len(inStr)
for i in range(0,count) :
outStr +=inStr[count-(i+1)]
print("거꾸로 출력-->%s" % outStr)
0 댓글