I'm trying to pass argument inside function but no successes. the purpose of this function is to return xml tag this code doesn't work:
from bs4 import BeautifulSoup
def xmlTag(message):
conf = open('timeLimit.conf').read().lower()
for config in conf.splitlines():
if config in conf.splitlines():
data = BeautifulSoup(conf, "lxml")
tag = data.message
print(tag['msg'])
break
xmlTag("fun2")
if i put fun2 instead of "message" variable, like this "tag = data.fun2" the code works please help what i"m doing wrong