MapleStory Finger Point

๐Ÿ’Ž Python/Python_Code

์ž…๋ ฅ ๋ฌธ์ž์—ด์„ ๊ฑฐ๊พธ๋กœ ์ถœ๋ ฅํ•˜๊ธฐ - ํŒŒ์ด์ฌ for Beginner (2ํŒ)

HYEJU01 2024. 3. 18. 21:17

๋ฌธ์ž์—ด์„ ๋จผ์ € ์ž…๋ ฅ ๋ฐ›๋Š”๋‹ค.

 

for๋ฌธ์„ ์‚ฌ์šฉํ•ด์„œ ๊ฑฐ๊พธ๋กœ ์ถœ๋ ฅ์„ ํ•ด์ค„๊ฑด๋ฐ

 

for ๋ณ€์ˆ˜ in range(์‹œ์ž‘๊ฐ’, ๋๊ฐ’, ์ฆ๊ฐ) 

 

๋ฌธ์ž์—ด ๊ธธ์ด -1  (์•ˆ๋…•ํ•˜์‹ญ๋‹ˆ๊นŒ 6๊ฐœ -1 = 5)

5๋ถ€ํ„ฐ ์‹œ์ž‘ํ•ด์„œ -1 ๊นŒ์ง€  -1์”ฉ ๊ฐ์†Œํ•˜๊ธฐ

 

inStr[5] [4] [3] [2] [1] [0] ๊นŒ์ง€ ์‹คํ–‰

 

end = "" ๋Š” ๊ฐœํ–‰ ๋ฐฉ์ง€

inStr = ""


if __name__ == "__main__" :
    inStr = input("๋ฌธ์ž์—ด ์ž…๋ ฅ -> ")

    for i in range(len(inStr) -1, -1, -1):
        print('%c' % inStr[i], end = '' )