일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- python3
- clone
- VPC
- docker
- AWS
- Python
- Linux
- 포인트앱
- 리뷰
- MongoDB
- DocumentDB
- 후기
- MongoEngine
- S3
- mininet
- 하나머니
- 리워드앱
- 토스카드
- codecommit
- namespace
- 도커
- aws codecommit
- docker network
- network
- 앱테크
- Container
- 실사용
- 재테크
- 커피머니불리기
- built-in
- Today
- Total
ㅍㅍㅋㄷ
python - filter() filter 함수는 built-in 함수로 list 나 dictionary 같은 iterable 한 데이터를 특정 조건에 일치하는 값만 추출해 낼때 사용하는 함수이다. 먼저, python docs 의 filter 에 대한 정의를 보면 아래와 같다. filter(function, iterable) Construct an iterator from those elements of iterable for which function returns true. iterable may be either a sequence, a container which supports iteration, or an iterator. If function is None, the identity func..
python - literal_eval 은 정말 안전한 eval 인 것인가. 지난 포스팅에서 eval() 에 대해 알아 보았는데(eval()함수 사용을 조심해야 하는 이유), 마지막에 literal_eval 에 대해 잠깐 언급하였다. 이번 포스팅에서는 literal_eval 이 어떤 놈인지, eval 과는 어떤 차이가 있는지 알아보려 한다. literal_eval은 eval 과는 다르게 built-in 함수는 아니며, AST(Abstract Syntax Trees) module 에서 제공하는 함수 중 하나이다. AST 모듈은 문법을 구조화 시켜주는 모듈 정도로 이해하고 넘어가자. literal_eval에 대한 Python docs 를 보면 아래와 같이 설명되어 있다. ast.literal_eval(nod..
python eval() 함수 python 의 built-in 함수 중 하나인 eval 함수는 매우 강력하면서도 사용을 자제 하도록 권고하는 양날의 검과 같은 기능이다. 먼저 python docs 의 정의를 보자. eval(expression, globals=None, locals=None) The arguments are a string and optional globals and locals. If provided, globals must be a dictionary. If provided, locals can be any mapping object. The expression argument is parsed and evaluated as a Python expression (technically ..