def getIndexOfMinVal(lst):
	""" Find index of smallest value in a list """
	
	#initialize current min value and index to first element

	minIndex = 0 # index of current minimal value
	val = lst[0] # current minimal value

	# loop through all elements

	for i in range(1, len(lst)):
		
		# if current value is smaller than current minimum -> update values

		if lst[i] < val:
			minIndex = i
			val = lst[i]
	return minIndex