import os

# get current directory
currdir = os.getcwd()
print(currdir)

# list files and directory
l = os.listdir(currdir)
print(l)

for f in l:
	if os.path.isdir(f):
		print(f)

import glob
print(glob.glob("1/*.xml")[0].replace('\\','/'))

def search_in_folder(folder, condition):
	xmlfile = open(glob.glob(folder+"/*.xml")[0].replace('\\','/'))
	xmlcontents = xmlfile.read()
	if condition in xmlcontents:
		print("dd")

search_in_folder("1","book")
search_in_folder("2",'type="book"')

#open("list.txt", "w").write("123\n")

import re
line = "123"
x="1"
y=""
line = re.sub(r""+re.escape(x),y,line)
print(line)

print("*" in "123")
881732a7a85696fe0c2219a5b05df2d9951fd93a
<mask token>


def search_in_folder(folder, condition):
    xmlfile = open(glob.glob(folder + '/*.xml')[0].replace('\\', '/'))
    xmlcontents = xmlfile.read()
    if condition in xmlcontents:
        print('dd')


<mask token>

<mask token>
print(currdir)
<mask token>
print(l)
for f in l:
    if os.path.isdir(f):
        print(f)
<mask token>
print(glob.glob('1/*.xml')[0].replace('\\', '/'))


def search_in_folder(folder, condition):
    xmlfile = open(glob.glob(folder + '/*.xml')[0].replace('\\', '/'))
    xmlcontents = xmlfile.read()
    if condition in xmlcontents:
        print('dd')


search_in_folder('1', 'book')
search_in_folder('2', 'type="book"')
<mask token>
print(line)
print('*' in '123')

<mask token>
currdir = os.getcwd()
print(currdir)
l = os.listdir(currdir)
print(l)
for f in l:
    if os.path.isdir(f):
        print(f)
<mask token>
print(glob.glob('1/*.xml')[0].replace('\\', '/'))


def search_in_folder(folder, condition):
    xmlfile = open(glob.glob(folder + '/*.xml')[0].replace('\\', '/'))
    xmlcontents = xmlfile.read()
    if condition in xmlcontents:
        print('dd')


search_in_folder('1', 'book')
search_in_folder('2', 'type="book"')
<mask token>
line = '123'
x = '1'
y = ''
line = re.sub('' + re.escape(x), y, line)
print(line)
print('*' in '123')

import os
currdir = os.getcwd()
print(currdir)
l = os.listdir(currdir)
print(l)
for f in l:
    if os.path.isdir(f):
        print(f)
import glob
print(glob.glob('1/*.xml')[0].replace('\\', '/'))


def search_in_folder(folder, condition):
    xmlfile = open(glob.glob(folder + '/*.xml')[0].replace('\\', '/'))
    xmlcontents = xmlfile.read()
    if condition in xmlcontents:
        print('dd')


search_in_folder('1', 'book')
search_in_folder('2', 'type="book"')
import re
line = '123'
x = '1'
y = ''
line = re.sub('' + re.escape(x), y, line)
print(line)
print('*' in '123')

import os

# get current directory
currdir = os.getcwd()
print(currdir)

# list files and directory
l = os.listdir(currdir)
print(l)

for f in l:
	if os.path.isdir(f):
		print(f)

import glob
print(glob.glob("1/*.xml")[0].replace('\\','/'))

def search_in_folder(folder, condition):
	xmlfile = open(glob.glob(folder+"/*.xml")[0].replace('\\','/'))
	xmlcontents = xmlfile.read()
	if condition in xmlcontents:
		print("dd")

search_in_folder("1","book")
search_in_folder("2",'type="book"')

#open("list.txt", "w").write("123\n")

import re
line = "123"
x="1"
y=""
line = re.sub(r""+re.escape(x),y,line)
print(line)

print("*" in "123")