Hi
My txt file looks something like this:
Branch: ltm_7.4
Destination: Test 5
lines = open("branch_dest.txt").readlines()
lines=[x.split() for x in lines]
print lines
branch = "%s" % lines[0][1].strip(': ')
print branch
destination = "%s" % lines[1][2].strip(': ')
print destination
I need to extract the branch name and the destination. But i get the below output.
[['Branch:', 'ltm_7.4'], ['Destination:', 'Test', '5']]
ltm_7.4
5
Branch is ok. But the destination needs to be Test 5. Kindly help as i am new to Python.