"파이썬 .items()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight , -</source> +</syntaxhighlight>))
 
3번째 줄: 3번째 줄:
;파이썬 .items()
;파이썬 .items()


<source lang='python' notebook>
<syntaxhighlight lang='python' notebook>
d = {'a':1, 'b':2}
d = {'a':1, 'b':2}
print( d.items() )
print( d.items() )
</source>
</syntaxhighlight>
<source lang='python' notebook>
<syntaxhighlight lang='python' notebook>
print( list(d.items()) )
print( list(d.items()) )
</source>
</syntaxhighlight>
<source lang='python' notebook>
<syntaxhighlight lang='python' notebook>
member = { 'ID' : 102, 'Name' : 'YONEZAWA Akinori', 'Address' : 'Naha, Okinawa' }
member = { 'ID' : 102, 'Name' : 'YONEZAWA Akinori', 'Address' : 'Naha, Okinawa' }
print( member.items() )  
print( member.items() )  
</source>
</syntaxhighlight>
<source lang='python' notebook>
<syntaxhighlight lang='python' notebook>
print( list(member.items()) )  
print( list(member.items()) )  
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2021년 4월 10일 (토) 02:45 기준 최신판

1 개요[ | ]

Python .items()
파이썬 .items()
d = {'a':1, 'b':2}
print( d.items() )
print( list(d.items()) )
member = { 'ID' : 102, 'Name' : 'YONEZAWA Akinori', 'Address' : 'Naha, Okinawa' }
print( member.items() )
print( list(member.items()) )

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}