
def find_substring(string, substr):
	string_len = len(string)
	substr_len = len(substr)
	i = 0

	if substr_len >= 1:
		i = 0
		while i < string_len:
			if string[i] == substr[j]:
				if j == substr_len:
					return i - substr_len
					j += 1
				else:
					j = 0
		i += 1


def find_substring(string, substr):
	string_len = len(string)
	substr_len = len(substr)
	i = 0

	if substr_len >= 1:
		i = 0
		while i < string_len:
			if string[i] == substr[j]:
				if j == substr_len:
					return i - substr_len
					j += 1
				else:
					j = 0
		i += 1

	return -1

Return -1 if no substring is found
Return -1 if no substring is found

  
  def find_substring(string, substr):
  	string_len = len(string)
  	substr_len = len(substr)
  	i = 0
  
  	if substr_len >= 1:
  		i = 0
  		while i < string_len:
  			if string[i] == substr[j]:
  				if j == substr_len:
  					return i - substr_len
  					j += 1
  				else:
  					j = 0
  		i += 1
  
+ 	return -1
+ 
Return -1 if no substring is found
## Code Before:

def find_substring(string, substr):
	string_len = len(string)
	substr_len = len(substr)
	i = 0

	if substr_len >= 1:
		i = 0
		while i < string_len:
			if string[i] == substr[j]:
				if j == substr_len:
					return i - substr_len
					j += 1
				else:
					j = 0
		i += 1

## Instruction:
Return -1 if no substring is found
## Code After:

def find_substring(string, substr):
	string_len = len(string)
	substr_len = len(substr)
	i = 0

	if substr_len >= 1:
		i = 0
		while i < string_len:
			if string[i] == substr[j]:
				if j == substr_len:
					return i - substr_len
					j += 1
				else:
					j = 0
		i += 1

	return -1
