๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๊ฐœ๋ฐœ21

ํŒŒ์ด์ฌ - Dictionary 1. Dictionary (dict) Dictionary๋Š” "ํ‚ค(Key) - ๊ฐ’(Value)" ์Œ์„ ์š”์†Œ๋กœ ๊ฐ–๋Š” ์ปฌ๋ ‰์…˜์ด๋‹ค. Dictionary๋Š” ํ”ํžˆ Map ์ด๋ผ๊ณ ๋„ ๋ถˆ๋ฆฌ์šฐ๋Š”๋ฐ, ํ‚ค(Key)๋กœ ์‹ ์†ํ•˜๊ฒŒ ๊ฐ’(Value)์„ ์ฐพ์•„๋‚ด๋Š” ํ•ด์‹œํ…Œ์ด๋ธ”(Hash Table) ๊ตฌ์กฐ๋ฅผ ๊ฐ–๋Š”๋‹ค. ํŒŒ์ด์ฌ์—์„œ Dictionary๋Š” "dict" ํด๋ž˜์Šค๋กœ ๊ตฌํ˜„๋˜์–ด ์žˆ๋‹ค. Dictionary์˜ ํ‚ค(key)๋Š” ๊ทธ ๊ฐ’์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์—†๋Š” Immutable ํƒ€์ž…์ด์–ด์•ผ ํ•˜๋ฉฐ, Dictionary ๊ฐ’(value)์€ Immutable๊ณผ Mutable ๋ชจ๋‘ ๊ฐ€๋Šฅํ•˜๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, Dictionary์˜ ํ‚ค(key)๋กœ ๋ฌธ์ž์—ด์ด๋‚˜ Tuple์€ ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ๋Š” ๋ฐ˜๋ฉด, ๋ฆฌ์ŠคํŠธ๋Š” ํ‚ค๋กœ ์‚ฌ์šฉ๋  ์ˆ˜ ์—†๋‹ค. Dictionary์˜ ์š”์†Œ๋“ค์€ Curly Brace .. 2021. 6. 28.
๋ฆฌ์•กํŠธ์˜ ํŠน์ง• ๋ฆฌ์•กํŠธ(React) ใ„ดReact๋Š” ํŽ˜์ด์Šค๋ถ์—์„œ ๊ฐœ๋ฐœํ•œ UI ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋กœ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ UI๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค€๋‹ค. ใ„ดReact๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ธด ํ•˜์ง€๋งŒ Redux, react-router์™€ ํ•จ๊ป˜ ํ”„๋ ˆ์ž„์›Œํฌ์ฒ˜๋Ÿผ ์‚ฌ์šฉ๋œ๋‹ค. ใ„ดReact๋Š” Virtual DOM์ด๋ผ๋Š” ๊ฐœ๋…์„ ์‚ฌ์šฉํ•˜์—ฌ ์ƒํƒœ ๋ณ€ํ™”์— ๋”ฐ๋ผ ์„ ํƒ์ ์œผ๋กœ UI๋ฅผ ๋ Œ๋”๋งํ•œ๋‹ค. DOM (Document Object Model) ใ„ด๊ฐ์ฒด๋ฅผ ํ†ตํ•ด ๊ตฌ์กฐํ™”๋œ ๋ฌธ์„œ๋ฅผ ํ‘œํ˜„ํ•˜๋Š” ๋ฐฉ๋ฒ•. (XML,HTML๋กœ ์ž‘์„ฑ) ใ„ด์›น ๋ธŒ๋ผ์šฐ์ €(ํด๋ผ์ด์–ธํŠธ)๋Š” DOM์„ ํ†ตํ•ด์„œ javascript, css๋ฅผ ์ ์šฉํ•œ๋‹ค. DOM์˜ ๋ฌธ์ œ์  ใ„ดDOM API์˜ ์ตœ๋Œ€ ๋ฌธ์ œ์ ์€ ๋™์  UI์— ์ตœ์ ํ™”๋˜์ง€ ์•Š์Œ์ด๋‹ค. ใ„ด๋Œ€๊ทœ๋ชจ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋˜๋Š” ์ˆ˜ ๋งŽ์€ ๋ฐ์ดํ„ฐ๊ฐ€ ๋กœ๋”ฉ๋˜๊ณ  ํ‘œํ˜„ํ•ด์•ผํ•˜๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ DOM์— ์ง์ ‘.. 2021. 6. 27.
ํŒŒ์ด์ฌ - list, tuple list, tuple #list ,tuple #์‚ฌ์šฉ๋ฒ•์€ ๊ฑฐ์˜ ๋™์ผ #list(์ถ”๊ฐ€, ์‚ญ์ œ๊ฐ€๋Šฅ) tuple ์€ (์ถ”๊ฐ€X, ์‚ญ์ œX) [a,b] = [10,20] #list (c,d) = (11,22) #tuple print(a) print(b) print(c) print(d) a = 100 print(a) c = 111 print(c) #tuple tuple_test = (10,20,30) print(tuple_test[0]) #tuple_test[0]= 100 ์—๋Ÿฌ ๋ฐœ์ƒ mylist = list(tuple_test) #tuple์„ list๋กœ ๋ณ€๊ฒฝํ›„์—๋Š” ๊ฐ’์„ ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ mylist[0] = 100 print(mylist[0]) list ์ถ”๊ฐ€ ์‚ญ์ œ #list - >array(๋™์ ) mylist = [23,56.. 2021. 6. 27.
ํŒŒ์ด์ฌ - Datetime & if ์กฐ๊ฑด๋ฌธ number = 12 if number > 0: print("0๋ณด๋‹ค ํฌ๋‹ค") if number = 12: print('ํ˜„์žฌ ์‹œ๊ฐ„์€ {}์‹œ๋กœ ์˜คํ›„์ž…๋‹ˆ๋‹ค'.format(now... 2021. 6. 26.