Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- python
- PyQt
- tensorflow
- swift
- IOS
- Excel
- node.js
- 유니티
- mssql
- port
- MySQL
- 라즈베리파이
- Linux
- MS-SQL
- javascript
- ASP
- pandas
- flutter
- 리눅스
- 맛집
- 날짜
- PER
- Unity
- 다이어트
- GIT
- urllib
- ubuntu
- 함수
- sqlite
- PyQt5
Archives
아미(아름다운미소)
python with open을 써서 파일을 여러 개 open하는 법 본문
with open을 써서 파일을 여러 개 open하는 법
with문을 써서 한 줄에 여러 개 파일을 열고 싶을때
try:
with open('a', 'w') as a, open('b', 'w') as b:
do_something()
except IOError as e:
print 'Operation failed: %s' % e.strerror
'랭귀지 > python' 카테고리의 다른 글
| python for in list (0) | 2019.04.05 |
|---|---|
| python filter (0) | 2019.04.03 |
| [PYTHON] MULTIPART FILE UPLOAD (0) | 2019.03.29 |
| Consider using the `--user` option or check the permissions. (0) | 2019.03.25 |
| Python3 내장 자료형 (0) | 2019.03.05 |
Comments