티스토리 뷰
728x90
모듈 소스를 볼 때, 아래와 같은 코드를 발견할 때가 있습니다.
from __future__ import print_function
짧게 설명하면 Python2를 Python3으로 일일히 고쳐주기 싫을 때, 해당 모듈을 쓰면 사용 가능합니다.
# In python version 2
print 'hello world'
# From python version 3
print('hello world')
다른 모듈의 종류는 이렇게 있습니다.
from __future__ import absolute_import, division,
print_function,
nested_scopes,
generators,
with_statement,
unicode_literals
728x90
'Skills > Pythons' 카테고리의 다른 글
[Python] 프로그래머스 배열 회전 시키기 (0) | 2022.12.29 |
---|---|
[Python] Jupyter module - %load_ext autoreload %autoreload 2 (0) | 2022.12.23 |
[Python] None 보다는 예외를 발생시키는 방법 (2) | 2022.12.13 |
[Python] 딕셔너리 - defaultdict의 사용 (0) | 2022.12.08 |
[Python] dictionary 딕셔너리 - in, KeyError, get, setdefualt 메서드 (0) | 2022.12.07 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 파이썬 딕셔너리
- cs231n
- 구글드라이브연동
- 퓨샷러닝
- support set
- 도커
- 파이썬 클래스 계층 구조
- stylegan
- Prompt
- docker
- 도커 작업
- linux nano
- 파이썬 클래스 다형성
- python
- 리눅스
- few-shot learning
- 리눅스 나노 사용
- style transfer
- NLP
- Unsupervised learning
- 서버구글드라이브연동
- prompt learning
- 리눅스 nano
- 프롬프트
- CNN
- clip
- 딥러닝
- 파이썬
- 리눅스 나노
- 도커 컨테이너
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함
250x250