-
Notifications
You must be signed in to change notification settings - Fork 0
Python DataType
GitDeveloperKim edited this page Feb 6, 2022
·
4 revisions
- True
- False
- None
- {'key1':value1, 'key2':value2} <-- ์ด๊ฒฝ์ฐ '=' ์ ์ด์ฉํด ํค์ ๊ฐ์ ๋์ ์ํฌ์ ์๊ณ ':' ์ฝ๋ก ์ ์จ์ผํ๋ค
- dict()
- dic = dict( Key1=Value1, Key2=Value2, โฆโฆ )
- dic = dict( zip( [ Key1, key2, โฆโฆ ], [ Value1, Value2, โฆโฆ ] ) )
- dic = dict( [ (Key1, Value1), (Key2, Value2), โฆโฆ ] )
- dic = dict( { Key1:Value1, Key2:Value2, โฆโฆ } )
- keys ๋ฆฌ์คํธ์ values ๋ฆฌ์คํธ๋ฅผ ์ด์ฉํด ๋์ ๋๋ฆฌ๋ฅผ ๋ง๋ค๊ณ ์ถ์ ๊ฒฝ์ฐ -> dict(zip(keys, values))