summaryrefslogtreecommitdiff
path: root/comp/work/13/find_smallest.py
blob: 362383a75a877738a396729f1f834bf42f338395 (plain)
1
2
3
4
5
6
7
8
9
def find_smallest(numbers):
	smallest = numbers[0]
	for i in numbers:
		if i < smallest:
			smallest = i
	return smallest

numbers = [3, 6, 2, 8, 4, 1]
print(find_smallest(numbers))