#Problem
#Submission
submission.py
class Solution:
def search(self, nums: List[int], target: int) -> bool:
if nums.count(target) > 0:
return True
else:
return False
targetの有無の判定だけでOKですね。
Go to list of users who liked
More than 3 years have passed since last update.
#Problem
#Submission
class Solution:
def search(self, nums: List[int], target: int) -> bool:
if nums.count(target) > 0:
return True
else:
return False
targetの有無の判定だけでOKですね。
Register as a new user and use Qiita more conveniently
Go to list of users who liked