我有一個列表基於Python的.Count中
results=[['hgd', '2.96', '4,433,389', '-13.7'], ['bbd.a', '2.25', '1,209,421', '-13.1'], ['mri.u', '8.60', '3,000', '-8.5'], ['iam', '1.06', '1,000', '-7.8'], ['hnd', '21.76', '1,180,466', '-7.6'], ['tth', '0.97', '41,777', '-7.6'], ['bbd.b', '1.89', '32,423,597', '-7.4'], ['bbd.pr.c', '15.20', '43,737', '-7.3'], ['esp', '1.96', '87,604', '-7.1'], ['enl', '34.00', '5,239', '-6.2'], ['rmp', '1.83', '2,688,261', '-5.7'], ['amm', '1.39', '63,301', '-5.4'], ['vrx', '41.83', '1,664,689', '-5.4'], ['xtc', '13.45', '63,453', '-5.3'], ['cxr', '36.48', '1,642,197', '-5.0']]
內以下列表此列表每日更新從列表中刪除列表。有時,當第1個要素有兩個句號(。),如以下bbd.pr.c
['bbd.pr.c', '15.20', '43,737', '-7.3']
當發生這種情況我想刪除整個目錄列表。不確定如何去做這件事。使用計數功能。
.count('.')<=1
任何幫助?
是什麼。計數? – dbliss
@dbliss:這是一個[Common Sequence Operation](https://docs.python.org/3/library/stdtypes.html#common-sequence-operations) – zondo
@zondo ok。這是一種在沒有關聯對象的情況下被調用的方法。 – dbliss