How to assess a specific estimation of a record in a rundown of records utilizing Python?
How to assess a specific estimation of a record in a rundown of records utilizing Python?
Initialise your additional line to True for every segment, at that point circle over lines in the rundown, and if any qualities in that line are None, set the incentive to False at the comparing position in the additional column. At that point you can build the entire yield list from the info list and the additional line.
lst1 = [[77, 17, None, 77, 21],
[49, 91, 96, 83, 72],
[60, 70, 64, 27, 14],
[70, 53, 94, 61, 60],
[48, 18, None, 59, 84]]
outline = [True for _ in lst1[0]]
for line in lst1:
for I, val in enumerate(row):
in the event that val is None:
summary[i] = False
lst2 = lst1.copy() + [summary]
print(lst2)
Gives (in the wake of embeddings newlines for coherence):
[[77, 17, None, 77, 21],
[49, 91, 96, 83, 72],
[60, 70, 64, 27, 14],
[70, 53, 94, 61, 60],
[48, 18, None, 59, 84],
[True, True, False, True, True]]
No comments
Post a Comment