python中去掉列表中的引号方法

例如:python中数据为['123,234,234']如何变成[123,234,234]

又如自己的小例子:
# 获取数据
ciphertext1 = input('待解密数据:')
print(ciphertext1)
a = [ciphertext1]
ciphertext = [int(i) for i in a[0].split(',')]
print(ciphertext)

本文来自博客园,作者:Jaoany,转载请注明原文链接:https://www.cnblogs.com/fanglijiao/p/15075399.html

原文地址:https://www.cnblogs.com/fanglijiao/p/15075399.html