일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 파이썬을파이썬답게
- 에러해결
- Tire
- 논문
- mMAPE
- Overleaf
- 평가지표
- 프로그래머스
- 논문editor
- RMES
- SMAPE
- n_sample
- knn
- Alignments
- iNT
- MAPE
- n_neighbors
- mes
- 논문작성
- Pycaret
- 코테
- Python
- KAKAO
- Mae
- PAPER
- python 갯수세기
- 스택
- 카카오
- TypeError
- Scienceplots
- Today
- Total
목록Python (33)
EunGyeongKim
documentation link collections — Container datatypes — Python 3.10.6 documentation collections — Container datatypes Source code: Lib/collections/__init__.py This module implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple. namedtuple() factory f docs.python.org collectoins모듈의 Counter 예제코드 counter : A Counte..
n진법 -> 10진법으로 변환시 에러 num, base = map(int, input().strip().split(' ')) int(num, base) 이런식으로 n진법을 10진법으로 변환해줄때 ----> print(int(num, base)) TypeError: int() can't convert non-string with explicit basetype에러가 나타난다. num이 string이 아니라서 생기는 문제! 걍 num을 str형태로 바꿔주면 된다! 에러 수정 코드 num, base = map(int, input().strip().split(' ')) int(str(num), base) 에러 해결 끝! :D
https://school.programmers.co.kr/learn/courses/4008 파이썬을 파이썬답게 본 강의는 파이썬 문법을 이미 알고 있는 분들을 대상으로 만들어졌습니다. ##### 이런 분들께 추천합니다 * 파이썬 문법을 알고 계시는 분 * 알고리즘 문제를 조금 더 쉽게 풀고 싶은 분 * Python 코 school.programmers.co.kr 몫과 나머지 a = 45 b = 6 # 일반사람 코드 print (a // b, a%b) # divmod를 사용한 코드 print(*divmod(a, b)) divmod이 안좋음. 작은 숫자를 다룰때 a//b, a%b보다 느림 n진법을 10진법으로 바꾸기 num = '3212' base = 4 # int는 함수의 진법변환 지원 answer = ..