I've collected a list of True or false items from a file and converted them into a list of strings:
status = ['True', 'True', 'True', 'True', 'True', 'True', 'True', 'True', 'False']
But I need to input these into a function that only accepts the boolean value of each, but this makes all these strings all be true due to actually having a value inside the string.
In short, here is what I need to convert to:
status = [True, True, True, True, True, True, True, True, False]
So I've tried a few different loop structures as such:
for v in status:
if v == "True":
v = True
if v == "False":
v = False
However this still gives back the strings in the list, or I've had the list values be deleted. Thanks for any help everybody.