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 |
Tags
- PER
- flutter
- 다이어트
- 날짜
- port
- IOS
- 리눅스
- MS-SQL
- 라즈베리파이
- pandas
- GIT
- mssql
- tensorflow
- Unity
- urllib
- sqlite
- 맛집
- python
- Excel
- Linux
- MySQL
- PyQt5
- ASP
- javascript
- node.js
- ubuntu
- 함수
- PyQt
- 유니티
- swift
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