Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 코테
- implement
- Data Structure
- geometry
- Counting
- array
- dynamic programming
- database
- SQL
- Class
- greedy
- sorting
- java
- two pointers
- string
- bit manipulation
- 코딩테스트
- simulation
- Stack
- Binary Tree
- Method
- 구현
- 파이썬
- hash table
- 자바
- Matrix
- Math
- Tree
- Number Theory
- Binary Search
Archives
- Today
- Total
목록continue (1)
코린이의 소소한 공부노트

코드를 짜다보면 반복적으로 해야 할 일들이 꽤 많이 생기게 된다. 예를 들면.. # 노란색 펜이 어디있더라..? pencil_case = ['파란색 펜', '까만색 펜', '지우개', '자', '노란색 펜', '빨간색 펜', '샤프'] if pencil_case[0] == '노란색 펜': print('0번째에 있었네!') elif pencil_case[1] == '노란색 펜': print('1번째에 있었네!') # .. 중략 .. elif pencil_case[5] == '노란색 펜': print('5번째에 있었네!') else: print('...마지막에 있었네..') 사람 편하자고 하는게 코딩인데, 이렇게 불편하게 쓸 수는 없다!! 위의 예시의 경우는 오늘 볼 while(와일)문 또는 for(포)문으..
Python
2021. 5. 21. 21:00