# !/usr/bin/env Python3
# -*- coding: utf-8 -*-
# @Author : Dorian
# @FILE : emurate_fun.py
# @Time : 2022/7/24 0024 23:06
names = ["小A", "小B", "小C", "小D"]
dicts = {}
for index, value in enumerate(names):
dicts[index] = value
print(dicts)
dicts = {}
for index in range(len(names)):
dicts[index] = value
print(dicts)
dicts = {}
for index, value in enumerate(names, 1):
dicts[index] = value
print(dicts)
lists = list(enumerate(names))
print(lists)
"""
{0: '小A', 1: '小B', 2: '小C', 3: '小D'}
{0: '小D', 1: '小D', 2: '小D', 3: '小D'}
{1: '小A', 2: '小B', 3: '小C', 4: '小D'}
[(0, '小A'), (1, '小B'), (2, '小C'), (3, '小D')]
"""