List to string

Jmnote (토론 | 기여)님의 2017년 10월 18일 (수) 15:46 판 (새 문서: ==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...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

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]