반응형
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
- Python
- Kotlin
- PySpark
- hive
- string
- Mac
- dataframe
- Github
- 파이썬
- Java
- Apache
- PANDAS
- matplotlib
- PostgreSQL
- numpy
- Google Excel
- Excel
- google apps script
- GIT
- array
- c#
- Redshift
- Tkinter
- Google Spreadsheet
- SQL
- math
- django
- list
- gas
Archives
- Today
- Total
목록ANY (2)
달나라 노트
Python Basic : any, all
Python의 빌트인 함수인 any, all method를 알아봅시다. any, all method를 간략하게 정리해보면 아래와 같습니다. any : 전달받은 요소 중 하나 이상이 True일 경우 True return. (모든 요소가 False인 경우 False return) all : 전달받은 요소 전부가 True일 경우 True return. (하나라도 False가 있을 경우 False return) 또한 any, all method의 주의점은 list나 tuple같은 반복 가능한(iterable) 데이터를 parameter로서 받는다는 것입니다. 다음 예시를 보시죠. print(any([True, True])) # Result --> True print(any([True, False])) # Res..
Python/Python Basic
2022. 1. 20. 20:03
Kotlin - all, any, none
Original source = play.kotlinlang.org/byExample/01_introduction/01_Hello%20world fun main() { var list_numbers = listOf(1, -1, 2, -2, 3, -3, 4, -4, 5, -5) // 1 var var_all_even = list_numbers.all {x -> x % 2 == 0} // 2 println(var_all_even) var var_all_lt_100 = list_numbers.all {it x < 0} // 4 println(var_any_negat..
Kotlin
2021. 3. 15. 23:41