본문 바로가기 메뉴 바로가기

tranquille

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

tranquille

검색하기 폼
  • 분류 전체보기 (331)
    • dev (277)
      • algorithm (247)
      • aws (4)
      • cpp (1)
      • docker (1)
      • git (0)
      • golang (1)
      • java (7)
      • linux (1)
      • mariadb (1)
      • mongodb (8)
      • python (1)
      • etc (3)
    • anime~ (0)
    • art (1)
    • ballet (5)
      • stretch (1)
      • motion (4)
    • mac (6)
    • monologue (3)
    • musique (31)
    • films (2)
    • français (4)
    • русский язык (2)
  • 방명록

dev/python (1)
Python 한글 주석 사용하기

파이썬에서 한글 주석 사용시 다음 에러가 발생한다. SyntaxError: Non-ASCII character '\xec' in file ./{file_name}.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for detail 파이썬 파일 최상단에 encoding을 utf-8로 설정해주는 다음과 같은 문구를 작성하면 한글 주석을 사용할 수 있다. # -*- coding: utf-8 -*-

dev/python 2020. 6. 1. 19:42
이전 1 다음
이전 다음
글 보관함
최근에 달린 댓글
TAG
  • 스택
  • 알고리즘
  • Macbook pro 2012 mid 13
  • 맥북프로
  • 백준
  • MongoDB
  • baekjoon
  • java
  • 플로이드와샬
  • python3
  • 분할정복
  • 큐
  • BFS
  • 자가교체
  • AWS
  • 브루트포스
  • dfs
  • 자바
  • go
  • 맥북 업그레이드
  • ballet
  • 발레
  • dp
  • Algorithm
  • 해시맵
  • Golang
  • 몽고디비
  • 맥북
  • BOJ
  • 이분탐색
more
Total
Today
Yesterday

Blog is powered by Tistory / Designed by Tistory

티스토리툴바