Mar-25-2023, 03:43 AM
Hi, problem i have is i am downloading a json file and putting in a string, when i am getting data from the string at times there is some info that is not in the json file because ii is just not available, i need to replace this blank info with a zero so when i process all the other data i don't get errors, he is some simple code where i add all the data from that item to a list.
laststart = previous[0]["handicap"]
weightchange += [laststart]
the variable laststart should contain the output of "handicap" but when "handicap" is not in the json file this is missing from my list, as an example the list should contain 14 items but only has 13
laststart = previous[0]["handicap"]
weightchange += [laststart]
the variable laststart should contain the output of "handicap" but when "handicap" is not in the json file this is missing from my list, as an example the list should contain 14 items but only has 13