Get the App
SLTechnology News&Howtos  ›  Development  › 

How to create a Dictionary in python

Shulou Source: shulou.com Published: 2022-06-01 03:10:24 09月22日 Update

This article mainly shows you "how to create a dictionary in python", the content is simple and easy to understand, organized clearly, I hope to help you solve doubts, let Xiaobian lead you to study and learn "how to create a dictionary in python" this article bar.

Three ways to create a dictionary #The first method dic1 = {'name':' hacker','age':' 18'}#The second method dic2 = dict(name='hacker', age=' 18')#The third method dic3 = dict([('name ',' hacker'),('age ',' 18')]) What are the five characteristics of python? Python's five characteristics: 1. Easy to learn, when developing programs, focus on solving problems, not understanding the language itself. 2. Compared to other major languages such as C++ and Java, Python implements object-oriented programming in a very powerful and simple way. 3. Portability: Python programs run on a variety of platforms without modification. 4. Interpretative, Python programs do not need to be compiled into binary code, and can be run directly from source code. 5. Python is one of FLOSS(Free/Open Source Software).

That's all for "how to create a dictionary in python." Thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Tags: Dictionaries methods programs content articles languages objects features learning help running powerful free binary code platforms ways easy to learn easy to understand more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Tech Info vpn Linux OPPO Reno