yuns

int list to string 본문

python 간단 문법 정리

int list to string

yuuuun 2021. 6. 17. 18:08
반응형

num_list가 int타입일 경우에는 ' '.join(num_list)로 해주면 에러가 난다. 따라서 아래와 같이하면 된다

' '.join(map(str, num_list))

 

반응형

'python 간단 문법 정리' 카테고리의 다른 글

string모듈  (0) 2021.07.07
n진수로 나타내기  (0) 2021.07.07
sort한 다음에 index 반환  (0) 2021.06.15
list key로 정렬하기  (0) 2021.06.02
defaultdict에서 key를 list로  (0) 2021.04.30
Comments