顺序查找就是把数组遍历一遍,找到目标值
def search(nums,x): for i in range(len(nums)): if nums[i]==x: return i return False print(search(nums,x))