I'm making a Python(3) progam to read this text file:
firstval="myval"
secondval="myotherval"
and turn it into a dict.
I tried this:
lines = file.readlines().split("\n")
values = []
for line in lines:
values.append(line.split("="))
to turn the file into a list
How do i turn this:
values = ["firstval", "myval", "secondval", "myotherval"]
into this:
values = {
"firstval": "myval",
"secondval": "myotherval"
}