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

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.

主站蜘蛛池模板: 阿拉善左旗| 永仁县| 神池县| 桂林市| 新野县| 介休市| 常州市| 若尔盖县| 兰西县| 阿拉尔市| 蕉岭县| 珲春市| 乌鲁木齐县| 射阳县| 中西区| 博客| 中阳县| 怀集县| 崇明县| 略阳县| 瑞昌市| 合阳县| 方山县| 泊头市| 湛江市| 盘山县| 肥城市| 香河县| 长丰县| 孝感市| 亚东县| 石林| 肥乡县| 临泽县| 尤溪县| 赤峰市| 雅安市| 师宗县| 松阳县| 江安县| 井研县|