old_contents: #coding: utf-8
  
  import re
  
  
  def is_valid_url(url):
      """
      Validates URL input
      """
      regex = re.compile(
          r'^(?:http|ftp)s?://'  # http:// or https://
          r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?'
          r'|[A-Z0-9-]{2,}\.?)|'  # domain...
          r'localhost|'  # localhost...
          r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|'  # ...or ipv4
          r'\[?[A-F0-9]*:[A-F0-9:]+\]?)'  # ...or ipv6
          r'(?::\d+)?'  # optional port
          r'(?:/?|[/?]\S+)$', re.IGNORECASE)
  
      if regex.search(url):
          return True
      return False
  
new_contents: # coding: utf-8
  
  import re
  
  
  def is_valid_url(url):
      """
      Validates URL input
      """
      regex = re.compile(
          r'^(?:http|ftp)s?://'  # http:// or https://
          r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?'
          r'|[A-Z0-9-]{2,}\.?)|'  # domain...
          r'localhost|'  # localhost...
          r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|'  # ...or ipv4
          r'\[?[A-F0-9]*:[A-F0-9:]+\]?)'  # ...or ipv6
          r'(?::\d+)?'  # optional port
          r'(?:/?|[/?]\S+)$', re.IGNORECASE)
  
      if regex.search(url):
          return True
      return False
  
subject: Fix PEP8 error :snake: