Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('oids.txt', 'r') as file:
- oids = file.readlines()
- print(oids) # just to prove that it was converted to list of officeIds
- # if you want to get rid of '\n' you should consider using oid.strip() function
- with open('oids.xml', 'w') as file:
- file.write(f'<xml>')
- for oid in oids:
- file.write(f'<officeid>{oid}</officeid>\n')
- file.write(f'</xml>')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement