Write a function that replaces 'two', 'too' and 'to' with the number '2'. Even if the sound is found mid word (like in octopus) or not in lowercase grandma still thinks that should be replaced with a 2. Bless her.

```text
'I love to text' becomes 'I love 2 text'
'see you tomorrow' becomes 'see you 2morrow'
'look at that octopus' becomes 'look at that oc2pus'
```

Note that 'too' should become '2', not '2o'

Difficulty: introductory

Starter code:

def textin(st):
	

Solutions:
import re

def textin(txt ):
  return re.sub(r'(two|too|to)', '2', txt, flags=re.I)

import re

def textin(str):
    return re.sub('(?i)t[wo]?o','2',str)

textin = lambda s: __import__("re").sub(r"(?i)t[wo]?o", "2", s)

import re


def textin(stg):
    return re.sub(r"too|two|to", "2", stg, flags=re.I)

import re

def textin(st):
    return re.sub(r"t[wo]?o", "2", st, flags=re.IGNORECASE) 


import re
def textin(st):
    return re.sub(r'(TOO)|(TWO)|(TO)', '2', st, flags=re.IGNORECASE)

from re import sub

def textin(st):
    return sub(r'(?i)too|to|two', '2', st)

from re import sub

def textin(st):
    return sub(r'[tT][oO]{2}|[tT][oO]|[tT][wW][oO]', '2', st)

import re
def textin(st):
    obj = re.compile(r'(two|too|to)',re.I)
    return obj.sub('2',st)


from re import sub,IGNORECASE
def textin(st):
    return sub("two|too|to","2",st,flags=IGNORECASE)