
Fifastreet4pcdemofreedownload
Fifastreet4pcdemofreedownload
.
.
.
.Q:
retrieving values from a dict in a list that has been saved in a variable?
I’m trying to create a method where I take data from a csv file and then save the data in a dict in a list. This then needs to be saved in a variable so that can be used later.
However when the list is saved in a variable it no longer takes it for reference.
Here’s my code:
def input(csv_path,triage_path):
data = []
with open(csv_path, encoding=”utf-8″) as csv_file:
file = csv.reader(csv_file)
for line in file:
data.append(csv.DictReader(line))
return data
def data_access():
data_list = input(“ABC.csv”, ‘ABC’)
print (data_list)
return data_list
The method is never called when the variable ‘data_list’ is found. I have used the same method for other programmes in the past and stored the same data in the same way but this has only recently happened with this code.
EDIT – Here’s the solution
def input(csv_path,triage_path):
data = []
with open(csv_path, encoding=”utf-8″) as csv_file:
file = csv.DictReader(csv_file)
for line in file:
data.append(line)
return data
def data_access():
data_list = input(“ABC.csv”, ‘ABC’)
if data_list:
print (data_list)
else:
return
I will explain a bit more why. The csv_path and triage_path are entered from the user at the
f30f4ceada
http://www.rosesebastian.com/2022/06/17/upadhyay-and-nath-biophysical-chemistry-pdf-download-better/
https://automative.club/upload/files/2022/06/twxKxdJIdq4ktB6SZn8x_17_b435924f0efb03a63442d13f337bc31e_file.pdf
http://www.danielecagnazzo.com/?p=20226
http://kwan-amulet.com/archives/1895025
https://www.sdssocial.world/upload/files/2022/06/oe4nyTRYlq7DCMCbrrEc_17_b435924f0efb03a63442d13f337bc31e_file.pdf