Generation

generate functionThu, 02 May 2024

si el arreglo tiene ['5','4','/','3'] buscar si hay / aguardar en otro arreglo guardar el dato anterior el buscado y el posterior

def find(arr): if '/' in arr: arr1 = [] arr2 = [] arr1 = arr.split('/') arr2 = arr1[1].split('.') return arr2[0] else: return arr print(find('/home/user/Desktop/abc.txt')) A: You can use os.path.basename to

Want to kickstart your project?Use the new AI Studio to create your code