May-03-2020, 10:57 PM
Because everything after line 6 is indented, they are all checked for every element in "input". Did you mean to run them every time, or perhaps some of them are only to be run after the input in exhausted?
Because everything after line 8 is indented further, lines 9-12 are only executed when
Because everything after line 8 is indented further, lines 9-12 are only executed when
"test"
is found in line
. If that test fails, nothing else will be executed. If you want something to happen when the test fails, you'd need an else
condition, or just do it after the conditional is done (would happen regardless of the if statement).if "test" in line: # this is only run when the if expression is true isimsatırlistesi.append(int(satırsayısı)) print(isimsatırlistesi[0,"end"]) else: # this section is only run when the if expression is false print("Condition failed.") # This section is run after, regardless of the if expression.