Can you make a python function that replaces all the year dates (four digit numbers in this case) in a given string with '---'?
system
kya aap ek paythan fnction bana sakate hai jo kisi die gaye string main sabhi varsh kii tarikhon (is maamle main chaar ankon kii sankhya) ko '---' ke saath badal detaa he?
user
bilkul!yahan ek chota paythan fnction he jo kisi die gaye string main sabhi varsh kii tarikhon ko '---' ke saath badal detaa he:

def remove_num (string):
    sankhya = []
    string.split () main shabd ke liye:
        yadi koi (char.isdigit () chaar ke liye [*shabd]):
            verde = '
            numbers.Append (shabd)
    sankhya main sankhya ke liye:
        yadi len (sankhya) == 4:
            string = string.replace (num, '----')
        
    vaapasi string
assistant
<|system|>
</s>
<|user|>
kya aap ek paythan fnction bana sakate hai jo kisi die gaye string main sabhi varsh kii tarikhon (is maamle main chaar ankon kii sankhya) ko '---' ke saath badal detaa he?</s>
<|assistant|>
bilkul!yahan ek chota paythan fnction he jo kisi die gaye string main sabhi varsh kii tarikhon ko '---' ke saath badal detaa he:

def remove_num (string):
    sankhya = []
    string.split () main shabd ke liye:
        yadi koi (char.isdigit () chaar ke liye [*shabd]):
            verde = '
            numbers.Append (shabd)
    sankhya main sankhya ke liye:
        yadi len (sankhya) == 4:
            string = string.replace (num, '----')
        
    vaapasi string</s>
