I'm trying to write a python function with some parameters that are strings in the statement.
def deleteElement(file, selector, value):
with open(file) as f:
soup = BeautifulSoup(f, 'html.parser')
removeThis = soup.find('div', {selector : value}) ...
When I run the function, do I just type the values with quotes?
deleteElement('file.txt', 'class', 'main-div')
so that it would be interpreted as:
removeThis = soup.find('div', {'class' : 'main-div'})