官术网_书友最值得收藏!

  • The Python Workshop
  • Andrew Bird Dr Lau Cher Han Mario Corchero Jiménez Graham Lee Corey Wade
  • 134字
  • 2021-06-11 12:51:29

Choosing Types

By now, you have learned about most of the common data structures in Python. One of the challenges you might face is knowing when to use the various data types.

When choosing a collection type, it is useful to understand the unique properties of that type. For example, a list is for you to store multiple objects and to retain a sequence, a dictionary is for us to store unique key-value pair mappings, tuples are immutable, and sets only store unique elements. Choosing the right type for a particular dataset could mean an increase in efficiency or security.

Choosing an incorrect type for your data will lead to data loss, in most cases it leads to low efficiency while running our code, and in the worst case, we might lose our data.

主站蜘蛛池模板: 灌南县| 京山县| 南部县| 龙海市| 阿图什市| 乐都县| 巢湖市| 成都市| 晋宁县| 英山县| 扬州市| 姚安县| 朝阳市| 遵义县| 青海省| 高碑店市| 龙江县| 祁门县| 个旧市| 固阳县| 长垣县| 莲花县| 海兴县| 高碑店市| 渭源县| 滦南县| 时尚| 石楼县| 班玛县| 龙胜| 镇平县| 通辽市| 泽库县| 水富县| 乌兰县| 宁明县| 崇州市| 睢宁县| 肃北| 咸阳市| 盐城市|