예외처리(try ~ except) def f(a, b): try: ifa andb: return(a * b) + (a / b) elifa: return '불능' else: return '부정' exceptErrorName: return '똑 바로 살아라' 예외발생시키기 raise문에오류/예외의이름을넘길수있다. class ShortInputException(Exception): length = 0 atleast = 0 '''A user-defined exception class.''' def __init__(self, length, atleast): Exception.__init__(self) self.length = length self.atleast = atleast def exam(): try: te..
함수의 정의 def 함수명(파라미터):정의 return //생략 가능 내장함수 문자 변환 함수str(int) // 소수점 생략 repr(int) //수수점 생략x 숫자 변환 함수int(str) list 관련 함수len() // list의 길이 반환remove(list) // list에서 특정 값 삭제append(*) // 추가sort() // 정렬prime[*] // *번째 원소 삭제 => prime[*] = 값 //*번째 원소를 값으로 변경 범위 배열 생성range(2,7) // python2list(range(2,7)) // python 3=> [2,3,4,5,6] list(range(5))=> [0,1,2,3,4] 함수의 정의 def 함수명(파라미터): 정의 return //생략 가능 람다 lamb..
- Total
- Today
- Yesterday
- React-router
- jQuery
- data component
- angular router
- Router
- Redux
- mobx
- python3
- Spring Boot
- data grid component
- data table component
- data gird component
- Spring
- JavaScript
- MySQL
- https://www.tistory.com/auth/logout/
- react
- localStorage
- CSS
- data component module
- facebook login
- JSON
- Java
- JPA
- 페이스북 로그인
- 파이썬
- 파이썬3
- Angular
- Python
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |