用python怎么去掉这个列表元素的括号?
['10/07/19','15:07:42','10/07/19','15:07:30','10/07/19','15:07:32','10.85','10.86','2...
['10/07/19', '15:07:42', '10/07/19', '15:07:30', '10/07/19', '15:07:32', '10.85', '10.86', '29.8', '29.7', '{30.0}', '30.0', '15.99', '{16.00}', '1.2', '1.5', '9.9', '10.1', '88.7', '88.2', '112.3999', '112.3997', '-1', '-2']
怎么都没法去掉'{30.0}'和'{16.00}'里的{},求助 展开
怎么都没法去掉'{30.0}'和'{16.00}'里的{},求助 展开
1个回答
2019-10-07
展开全部
mylist = list() # 略
for i in range(len(mylist)):
if mylist[i].startwith('{'):
mylist[i] = mylist[i][1:-1]
for i in range(len(mylist)):
if mylist[i].startwith('{'):
mylist[i] = mylist[i][1:-1]
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询