일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- GIT
- java
- nginx
- JaCoCo
- {}
- PowerMock
- AWS
- Lodash
- Gitbook
- python
- sanghaklee
- ECMAScript2015
- ATOM
- ubuntu
- RESTful
- sinopia
- REST
- Unit-test
- Code-coverage
- dict
- node.js
- API
- NPM
- Linux
- 개인정보수정
- Travis CI
- Coveralls
- 인프런
- primitive type
- javascript
- Today
- Total
목록Python (4)
이상학의 개발블로그
$ python --version Python 3.8.0 $ python3 --version Python 3.6.9 한 OS에서 여러 버전의 Python이 설치된 경우 발생함 $ python3.8 -m venv .venv The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package using the following command. apt-get install python3-venv You may need to use sudo with that command. After instal..
Ubuntu 18.04에선 Python 3.6.x가 기본 pyhton3. 또한 python2가 기본 Python packages.ubuntu.com/bionic/python3 Ubuntu – Details of package python3 in bionic Package: python3 (3.6.5-3) interactive high-level object-oriented language (default python3 version) Other Packages Related to python3 dep: python3-minimal (= 3.6.5-3) minimal subset of the Python language (default python3 version) dep: libpython3-stdlib..

python dict default value when you access item 파이썬에서 자바스크립의 Object(객체)와 유사한 자료형은 Dictionary(딕셔너리)다. dict = { 'name': 'hak' } dict.get('name') # 'hak' dict.get('age') # '' dict.get('age', 30) # 30 dict.get('age') or 30 # 30 .get() 메소드의 두번째 파라미터에 기본 값을 줄 수 있다. 두번째 파라미터의 디폴트는 None이고, 디폴트 값이 있기 때문에 KeyError는 발생하지 않는다. or 연사자를 이용해 딕셔너리의 ..

python how to remove duplicate dict in list https://stackoverflow.com/questions/11092511/python-list-of-unique-dictionaries dict 전체 중복 # 순서가 보장되지 않음 list(map(dict, set(tuple(sorted(d.items())) for d in data))) # 순서가 보장됨 list(map(dict, collections.OrderedDict.fromkeys(tuple(sorted(d.items())) for d in data))) data = [ {'id': 1, 'name': 'hak', 'age': 30}, {'id&#..