现有列表['000001.XSHE', '000002.XSHE', '0000

资格题库2022-08-02  26

问题 现有列表['000001.XSHE', '000002.XSHE', '000003.XSHE', '000004.XSHE', '000005.XSHE', '000006.XSHE', '000007.XSHE', '000008.XSHE', '000009.XSHE', '000010.XSHE']删除该类表的第3个元素'000003.XSHE'将第3个元素'000003.XSHE'添加回去

选项

答案

解析 list_a =  ['000001.XSHE', '000002.XSHE', '000003.XSHE', '000004.XSHE', '000005.XSHE', '000006.XSHE', '000007.XSHE', '000008.XSHE', '000009.XSHE', '000010.XSHE']del list_a[2]print(list_a)list_a.insert(2,'000003.XSHE')print(list_a)
转载请注明原文地址:https://tihaiku.com/congyezige/2425221.html

最新回复(0)