python dictionary

Programming/Python

[Python-Basic] Dictionary Data Type - 3

# Dictionary is save each data using by pair of key and value # Make dictionary type object using by '{' or '}' keyword current_price = {} # Check data type using 'type()' function. print(type(current_price)) # Add new item with key current_price['naver'] = 1 # Check result print(current_price) # Add another item with key current_price['DaumKAKAO'] = 2 # Check result print(current_price) # Lengt..

Programming/Python

[Python-Basic] Dictionary Data Type - 2

current_price = {'Daum KAKAO': 2, 'naver':1, 'wooaBrothers':3} print(current_price) # get all keys of dictionary object # keys() function return type is not list object print(current_price.keys()) # Should be change object type to list type list(current_price.keys()) list_keys = list(current_price) print(list_keys) # Extract values of each item in the dictionary list_value = list(current_price.v..

JohnMark
'python dictionary' 태그의 글 목록