python, python3 경로가 다를 때.

파이썬 경로 확인

  1. shell에서 파이썬 켠뒤 경로 설정.

    python3
    >>> import sys
    >>> print(sys.executable)
    /Library/Developer/CommandLineTools/usr/bin/python3
    
  2. zshrc에서 python3 경로 설정

    vi ~/.zshrc
    export PYTHONPATH="/Library/Developer/CommandLineTools/usr/bin/python3"
    

Python 재귀 함수 반복 제한

Python 시간 계산 - datetime 매시간, 매분 까지 sleep

Python 순열, 조합, product - itertools

Python isalpha, lower, replace, re.sub, swapcase, set

Python 교집합, 합집합, Counter, lambda

소수 판별

Python 두 딕셔너리 병합, 최대, 최소 개수 출력 - itertool chain

Python 다익스트라 알고리즘- dijkstra, heapq

Python lambda 사용 - reduce

파이썬 Deque - pop, push 리스트보다 빠름

몫과 나머지 구분 - divmod

Python 리스트 인덱스 값과 같이 출력 - enumerate

숫자 n진법으로 변환

Python 경우의 수 팩토리얼

Python 구글 코랩(colab) 한글 깨짐 현상 해결방법 matplotlib, seaborn

Python csvwriter