새소식

언어/python

딕셔너리의 items( ) 함수

  • -

안녕하세요 lika-7입니다

이번시간에는 딕셔너리의 items( )을 반복문에서 사용하는 대해서 다루겠습니다.

example_dictionary = { "키A": "값A", "키B": "값B", "키C": "값C", } for key, element in example_dictionary.items(): print("dictionary[{}] = {}".format(key, element))

딕셔너리와 items( ) 함수를 사용하면 키와 값을 조합해서 쉽게 키, 값에 접근 할 수 있습니다.

Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.