Your friend won't stop texting his girlfriend.  It's all he does. All day. Seriously.  The texts are so mushy too! The whole situation just makes you feel ill.
Being the wonderful friend that you are, you hatch an evil plot.  While he's sleeping, you take his phone and change the autocorrect options so that every time he types "you" or "u" it gets changed to "your sister."

Write a function called autocorrect that takes a string and replaces all instances of "you" or "u" (not case sensitive) with "your sister" (always lower case).

Return the resulting string.

Here's the slightly tricky part: These are text messages, so there are different forms of "you" and "u".

For the purposes of this kata, here's what you need to support:

"youuuuu" with any number of u characters tacked onto the end
"u" at the beginning, middle, or end of a string, but NOT part of a word
"you" but NOT as part of another word like youtube or bayou

Source: codewars | Difficulty: EASY

Starter code: def autocorrect(input):
	

Solutions:
import re

def autocorrect(input):
	return re.sub('(?i)\\b(u|you+)\\b', 'your sister', input)


from re import sub, I

def autocorrect(input):
	return sub('\\b(you+|u)\\b', 'your sister', input, flags=I)


import re

def autocorrect(input):
	return re.sub("\\b(yo[u]+|[u])(?!'\\w)\\b", 'your sister', input, flags=re.IGNORECASE)


def autocorrect(s):
	(s, n) = (s.split(), [])
	for i in s:
		if i == 'you' or i == 'u':
			n.append('your sister')
		elif len(i) == 4 and i[:-1] == 'you':
			n.append('your sister' + i[-1])
		elif i.count('Y') + i.count('y') + i.count('o') + i.count('u') == len(i) and i.count('u') == len(i) - 2:
			n.append('your sister')
		else:
			n.append(i)
	return ' '.join(n)


import re

def autocorrect(i):
	return ' '.join((re.sub('^(y+o+u+|u)([,.!])?$', 'your sister\\2', word, flags=re.IGNORECASE) for word in i.split()))


import re

def autocorrect(input):
	rgx = '\\b([Yy]ou+|u)\\b'
	return re.sub(rgx, 'your sister', input)


import re

def autocorrect(input):
	auto_re = '\\b(u|you+)\\b'
	return re.sub(auto_re, 'your sister', input, flags=re.IGNORECASE)


import re

def autocorrect(input):
	return re.sub('(\\bu\\b|\\byo[u]+\\b)', 'your sister', input, flags=re.IGNORECASE)


import re
autocorrect = lambda s: re.sub('(?i)\\b(u|you+)\\b', 'your sister', s)