Created
June 29, 2018 07:12
-
-
Save jungbin-kim/f0f6b1928c267d4db8e1f2ad18eecb1d to your computer and use it in GitHub Desktop.
특정 item 제외한 리스트 만들기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// excludeNum의 int 값을 제외한 값들을 얻기 | |
val excludeNum = Seq(40501, 40500, 40502, 40527, 40533, 40554, 40566, 40516, 40523) | |
val range = (40498 to 40574) | |
val result = range.filterNot(i => excludeNum.contains(i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment