📅  最后修改于: 2022-03-11 14:46:20.385000             🧑  作者: Mango
arr = [0,1,2,3,4,5,6,7,8,9]
# A dictionary to check true or false
check = {True: "YES", False: "NO"}
# Define the function
def findNumber(arr, k):
# print the dictionary with the built in method for searching array elements
print(check[k in arr])