The parameter is also stored in the variable 'par'
import pyperclip as clipboard    
import time   
time.sleep(2)
ruta = r"C:\Users\nicoa\.TRIGGERcmdData\debug.log" 
with open(ruta,"r") as f:
    lista=[]
    x=1
    texto=[]
   
    for i in f:
        texto.append(i)
    for pos,char in enumerate((texto[-3])):     
        if(char == '.'): 
            x=x+1
        if char== '\'' :
            x=x+1              
        if x==2:
            lista.append(char)
        
    lista.pop(0)
    par="".join(lista)
    clipboard.copy(par)