코드로 우주평화

0131. You only need one - Beginner 본문

나는 이렇게 학습한다/Algorithm & SQL

0131. You only need one - Beginner

daco2020 2023. 2. 1. 00:43

You will be given an array a and a value x. All you need to do is check whether the provided array contains the value.

Array can contain numbers or strings. X can be either.

Return true if the array contains the value, false if not.



Solution:

check: bool = lambda x, y : y in x