태그>listcomprehension(총 2개의 글)
'listcomprehension' 관련 최근글
-
- A Byte of Python - More
-
SCIENART BB by SCIENART BB|2019/04/20 12:33
More 지금까지 파이썬의 주요 다양한 기능을 살펴봤다. 이 챕터에서는 파이썬에 대한 지식을 더 깊게하는 몇가지를 살펴볼 것이다. Passing tuples around 함수로 부터 다른 두 개의 값을 반환할 수 있다. 튜플을 사용하면 된다. >>> def get_error_details():...
- A Byte of Python - More
-
- [python] List Comprehension(리스트 내장)
-
내멋대로 해라 by icehan|2009/03/06 10:16
s = ' first item : second item : third item ' 공백을 없애고, ':' 기준으로 분리하여 리스트로 만들기 L = ['first item', 'second item', 'third item'] >>> L = [x.strip() for x in s.split(':')] s.split(':') # ':' 기준으로 분리한 리스트 x.strip() ..
- [python] List Comprehension(리스트 내장)