怎么用python语言将字符串转换成list_百度知道
问题描述: str='2257,4018,1096' ,list=[2257,4018,1096]最佳答案: >>> str='2257,4018,1096' >>> target_list = [int(x) for x in str.split(',')] >>> print target_list [2257, 4018, 109
跟老齐学Python之list和str比较_python_脚本之家
2014年9月20日 - _str[:4] 'Welc' >>> a = "python" >>> a*3 'pythonpythonpython' ...list和str转化 str.split() 这个内置函数实现的是将str转化为list。其中str="...