"List to string"의 두 판 사이의 차이

(새 문서: ==Python== 분류: Python * Python 2 <source lang='python'> mylist = [10,"test",10.5] print( type(mylist) ) print( mylist ) # <type 'list'> # [10, 'test', 10.5] mystr = str(mylis...)
 
1번째 줄: 1번째 줄:
;list to string
;array to string
==Python==
==Python==
[[분류: Python]]
[[분류: Python]]

2017년 10월 18일 (수) 15:47 판

list to string
array to string

Python

  • Python 2
Python
Copy
mylist = [10,"test",10.5]
print( type(mylist) )
print( mylist )
# <type 'list'>
# [10, 'test', 10.5]

mystr = str(mylist)
print( type(mystr) )
print( mystr )
# <type 'str'>
# [10, 'test', 10.5]