for i in rates:
if input_currency == currency:
if output_currency in rates[currency]:
pass
else:
for i in rates:
Is it generally a bad thing to use the same variable i again within a for loop? Even if I loop through the same data structure again? PyCharm just tells me it's been used already, but it still works.
forstatementsishould only be used to note an index, if at all, give yourself a real variable name, having said that, why do you need to iterate over the same object?jand thenk.