I can't get python to return the values of the function I have tried joining the function variables into one and I test the values separately with python print and they work but in the test it only returns the value none.
this is the code.
import codecs
import os
import re
a = str(r"'c:\videos\my video.mp4'")
b = a.replace('\\','/')
real_direct=b.replace(' ','')
max_caract = int(len(real_direct)-1)  
def dividir(i) :
   if real_direct[i]=='/' :
       print(real_direct[i])
       direct = real_direct[2 : i+1] 
       file = real_direct[i+1 : max_caract]
       #print(direct)
       #print(file)
       return (direct, file)
   else: 
        dividir(i-1)
print(dividir(max_caract))
 
     
     
     
    