Discuss / Python / 请问老师和各位同学

请问老师和各位同学

Topic source

三土2012

#1 Created at ... [Delete] [Delete and Lock User]

我想删除 L = [ ['Apple', 'Google', 'Microsoft'], ['Java', 'Python', 'Ruby', 'PHP'], ['Adam', 'Bart', 'Lisa'] ] 中的 'Google' 应该pop()什么呢? 谢谢大家的帮助了

刘万想

#2 Created at ... [Delete] [Delete and Lock User]
L[0].pop(1)  #删除Google
print(L)

L.pop(0)[1]

del 也可以删除的del L[0][1]


  • 1

Reply