Code: Select all
sorted (data, key = lambda i: i['hours']) #sorts through cache_file data
print([0])
if 'waveHeight' in [0] and 'dwd' in [0]['waveHeight'] and[0]['waveHeight']['dwd'] >= 2.00: #if date and waveHeight found <2.00 then print
print('Found')
It just gives me this error -
Code: Select all
sorted (data, key = lambda i: i['hours']) #sorts through cache_file data
TypeError: string indices must be integers
I am in a bit of a hurry so if there is any more information you need then just ask, and I should respond soon!