# Task
 You are implementing your own HTML editor. To make it more comfortable for developers you would like to add an auto-completion feature to it.

 Given the starting HTML tag, find the appropriate end tag which your editor should propose.

# Example

 For startTag = "<button type='button' disabled>", the output should be "</button>";
 
 For startTag = "<i>", the output should be "</i>".
 
# Input/Output

 - `[input]` string `startTag`/`start_tag`

 - `[output]` a string

Difficulty: introductory

Starter code:

def html_end_tag_by_start_tag(start_tag):
	

Solutions:
def html_end_tag_by_start_tag(start_tag):
  return "</" + start_tag[1:-1].split(" ")[0] + ">"

def html_end_tag_by_start_tag(start_tag):
    return "</{}>".format(start_tag.strip("<>").split(" ")[0])


import re
def html_end_tag_by_start_tag(start_tag):
    return re.sub('<(\w+)(?:.*)>', r'</\1>', start_tag)

def html_end_tag_by_start_tag(s):
    return '</{}>'.format(s[1:s.find(' ')])

def html_end_tag_by_start_tag(start_tag):
    w = start_tag.strip('< >').split(' ')
    return '</{}>'.format(w[0])

def html_end_tag_by_start_tag(start_tag):
    if " " in start_tag:
        a = start_tag.split(" ")
        return "</" + a[0][1:] + ">"
    else:
        return "</" + start_tag[1:-1] + ">"

import re

def html_end_tag_by_start_tag(s):
    r = re.match(r'<\w+',s).group()
    return f'</{r[1:]}>'

def html_end_tag_by_start_tag(s):
    result = s.split()[0][0]+'/'+s.split()[0][1:]+ '>'
    if result[-2:] == '>>':
        result = result.replace('>>','>')
    return result

from re import search
def html_end_tag_by_start_tag(tag):
    return f"</{search('<[a-z]+',tag).group()[1:]}>"

def html_end_tag_by_start_tag(start_tag):
    init = start_tag.split()[0].strip('>').strip('<')
    return f"</{init}>"