Advertisement
Guest User

Untitled

a guest
Dec 12th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. config_dict = dict()
  2.  
  3. with open('/home/ay/Desktop/config.txt') as fin:
  4. for line in fin:
  5. if line:
  6. conf = line.split('=', 1)
  7. config_dict[conf[0].strip()] = conf[1].strip()
  8.  
  9. print(config_dict)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement