code: def get_version(exe_path='youtube-dl'):
      '''Get the version string of youtube-dl.'''
      process = subprocess.Popen(
          [exe_path, '--version'],
          stdout=subprocess.PIPE
      )
      version_string = process.communicate()[0]
      version_string = version_string.decode().strip()
  
      assert ' ' not in version_string, version_string
  
      return version_strinf get_version(exe_path='youtube-dl'):
      '''Get the version string of youtube-dl.'''
      process = subprocess.Popen(
          [exe_path, '--version'],
          stdout=subprocess.PIPE
      )
      version_string = process.communicate()[0]
      version_string = version_string.decode().strip()
  
      assert ' ' not in version_string, version_string
  
      return version_string
docs: Get the version string of youtube-dl.