python实现创建新列表和新字典,并使元素及键值对全部变成小写
如下所示:
lists = ['tom','Jack','luCy','lily','jErry','anna'] dics = {'jack':'python','Lucy':'jaVa','jeRry':'rUby','lily':'c#',} new_lists = [] for i in lists: new_lists.append(i.lower()) print(new_lists) new_dics = {} for i,j in dics.items(): new_dics[i.lower()] = j.lower() print(new_dics)
相关推荐
Yasin 2020-06-04
拭血 2020-06-02
ZHANGYONGHAO0 2020-05-31
微微一笑 2020-05-26
wishli 2020-05-19
缘起宇轩阁 2020-05-08
hxok 2020-05-06
GimmeS 2020-04-30
jiong 2020-04-26
fly00love 2020-04-19
MLXY 2020-03-27
kaixinfelix 2020-03-27
huangql 2020-03-08
luyaoda0 2020-02-17
重善奉行 2020-02-14
wyqwilliam 2020-02-14
xirongxudlut 2020-01-31