
import re

def find_verses(message_body):
    """ Uses regex to search comment body for verse quotations. Returns
    a list of matches if found, None otherwise. """
    
    regex = (r"(?<=\[)(?P<book>[\d\w\s]+)(?P<chapter>\d+)\:?(?P<verse>\d+"
        + r"\-?\d*)?\s*\(?(?P<translation>[\w\-\d]+)?\)?(?=\])")
    
    return re.findall(regex, message_body)


import re

def find_verses(message_body):
    """ Uses regex to search comment body for verse quotations. Returns
    a list of matches if found, None otherwise. """
    
    regex = (r"(?<=\[)(?P<book>[\d\w\s]+)(?P<chapter>\d+)\:?(?P<verse>\d+"
        + r"\-?\d*)?\s*\(?(?P<translation>[\w\-\d]+)?\)?(?=\])")
    
    matches = re.findall(regex, message_body)
    if len(matches) == 0:
        return None
    else:
        return matches

Fix return value from find_verses()
Fix return value from find_verses()

  
  import re
  
  def find_verses(message_body):
      """ Uses regex to search comment body for verse quotations. Returns
      a list of matches if found, None otherwise. """
      
      regex = (r"(?<=\[)(?P<book>[\d\w\s]+)(?P<chapter>\d+)\:?(?P<verse>\d+"
          + r"\-?\d*)?\s*\(?(?P<translation>[\w\-\d]+)?\)?(?=\])")
      
-     return re.findall(regex, message_body)
+     matches = re.findall(regex, message_body)
+     if len(matches) == 0:
+         return None
+     else:
+         return matches
  
Fix return value from find_verses()
## Code Before:

import re

def find_verses(message_body):
    """ Uses regex to search comment body for verse quotations. Returns
    a list of matches if found, None otherwise. """
    
    regex = (r"(?<=\[)(?P<book>[\d\w\s]+)(?P<chapter>\d+)\:?(?P<verse>\d+"
        + r"\-?\d*)?\s*\(?(?P<translation>[\w\-\d]+)?\)?(?=\])")
    
    return re.findall(regex, message_body)

## Instruction:
Fix return value from find_verses()
## Code After:

import re

def find_verses(message_body):
    """ Uses regex to search comment body for verse quotations. Returns
    a list of matches if found, None otherwise. """
    
    regex = (r"(?<=\[)(?P<book>[\d\w\s]+)(?P<chapter>\d+)\:?(?P<verse>\d+"
        + r"\-?\d*)?\s*\(?(?P<translation>[\w\-\d]+)?\)?(?=\])")
    
    matches = re.findall(regex, message_body)
    if len(matches) == 0:
        return None
    else:
        return matches
