python๊ธฐ๋ณธ

์š”์ฆ˜ ๋“ฃ๋Š” ์ˆ˜์—…์—์„œ ๊ณผ์ œํ•˜๋‹ค๊ฐ€ ์žฌ๋ฐŒ์–ด์„œ ํ•œ๋ฒˆ ๋‚จ๊ฒจ๋ณธ๋‹ค inputs = "cat32dog16cow5" def find_string(inputs): result = [] word = "" for index,target in enumerate(inputs): if target.isdigit(): if word != "": result.append(word) word = "" else: word += inputs[index] return result string_list = find_string(inputs) print(string_list) word ์—๋‹ค๊ฐ€ ์ž ๊น string ์ €์žฅํ•ด๋‘๊ณ  number์ผ๋•Œ append ํ•˜๊ณ  word ์ดˆ๊ธฐํ™”, ๊ทธ๋ฆฌ๊ณ  word๊ฐ€ ๋นˆ ๋ฌธ์ž์—ด์ด ์•„๋‹ ๋•Œ๋งŒ appendํ•˜๋Š” ์กฐ๊ฑด ์ถ”๊ฐ€ ๊ฐ„๋‹จํ•œ..
ํ‚จ์ง€ (Kinzie)
'python๊ธฐ๋ณธ' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก