์์ฐจ ํ์ (Sequential Search) ? - ์ฌ๋ฌ ๋ฐ์ดํฐ ์ค์์ ์ํ๋ ๋ฐ์ดํฐ๋ฅผ ์ฐพ์๋ด๋ ๊ฒ์ ์๋ฏธ - ๋ฐ์ดํฐ๊ฐ ๋ด๊ฒจ์๋ ๋ฆฌ์คํธ๋ฅผ ์์์๋ถํฐ ํ๋์ฉ ๋น๊ตํด์ ์ํ๋ ๋ฐ์ดํฐ๋ฅผ ์ฐพ๋ ๋ฐฉ๋ฒ data = list() for num in range(10): data.append(randint(1, 100)) #random ๋ผ์ด๋ธ๋ฌ๋ฆฌ def sequencial(data, search_data): for index in range(len(data)): if data[index] == search_data: return index return -1 sequencial(data, 4)