| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 파이썬
- 완전탐색
- itertools
- 코딩
- join
- Queue
- Level2
- LeetCode
- AARRR
- Stack
- lv4
- 코딩테스트
- lambda
- collections
- coding
- 조합
- coding test
- Growth hacking
- tableau
- cte
- sql
- programmers
- python
- level4
- 프로그래머스
- mysql
- time complexity
- import re
- counter
- 코테
Archives
- Today
- Total
목록isdigit() (1)
ror_coding
[Programmers] 문자열 다루기 기본 - 12918
isdigit()로 숫자인지 확인 하기 !! 따흑 알던 코드였는데 존재를 잠깐 잊고 있었다..!!그리고 in (4,6) 쓰는게 SQL where 절에서의 활용과 같아서 하나 더 배울 수 있는 좋은 문제다 ㅎㅎ !! Question 문자열 s의 길이가 4 혹은 6이고, 숫자로만 구성돼있는지 확인해주는 함수, solution을 완성하세요. 예를 들어 s가 "a234"이면 False를 리턴하고 "1234"라면 True를 리턴하면 됩니다. Point len(s) in (4,6) 으로 s의 길이가 4 혹은 6인지 판별. [4,6] 도 가능.isdigit() Code def solution(s): return True if len(s) in (4,6) and s.isdigit() else False now ..
Coding Test/Python
2024. 10. 3. 21:02