in 1..10 -> print("x is in the range")
in validNumbers -> print("x is valid")
!in 10..20 -> print("x is outside the range")
else -> print("none of the above")
例如
if (code[0] in 'A'..'Z') {//首字母是否属于大写字母
in 1..10 -> print("x is in the range")
in validNumbers -> print("x is valid")
!in 10..20 -> print("x is outside the range")
else -> print("none of the above")
例如
if (code[0] in 'A'..'Z') {//首字母是否属于大写字母