I am reading in a text file and I want to access the information after a certain delimiter for example I'll have ["-t2=zoe", "-d2= box"]
as a list and I want the values zoe
and box
.
def Unlock(file):
inp = input("1: Command Line or 2: Log File ")
if inp == "1":
print("You chose cmd line")
with open(file) as f:
lines = f.readlines()
new = ""
if(len(lines) == 1):
new = lines[0]
new = new.replace('-t', '!-t')
new = new.split('!')
else:
new = lines
for i in range(1,len(new)):
if '-t' in new[i]:
print(new[i])