Home>

I want to select a string in which there is a coincidence. That's how it works

Def Get_Return (Time_Input):
    With Open ('nginx.log', 'r') AS File:
        For Str1 in File:
            get_time= STR1 [STR1.FIND (':') -2: STR1.FIND (':') + 6]
            While (Time_input== Get_Time):
                Print ('Show Get_time:' + Get_Time)
                Return Str1
VR= Get_Return ('07: 01: 45 ')
Print (VR)

And so there is no.

Def Return_Time ():
    With Open ('nginx-time.log', 'r') AS File:
        For Str1 in File:
            TIME= STR1
            Print ('Show Time:' + Time)
            Check= Get_Return (Time)
            Print ('Show Check:' + Str (check))

Returns None. Why?