Python 列表元素替换 ... Python里字符串(string)类型有replace 方法,但是列表(list)类型没有 ... rep = ['4' if x == '2' else x for x in lst].
確定! 回上一頁