|
def readJson(filename, col_num):
if not os.path.exists(filename) or not os.path.isfile(filename):
return ''
with open(filename) as fileObj:
col_dict = []
for line in fileObj.readlines():
line_list = re.split(' +', line)
print(line_list)
col_dict.append(line_list[col_num])
return col_dict |
|