From ab0912b96853c632f00f492d03a7d245518315b0 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Fri, 6 Jan 2023 15:10:45 +0100 Subject: [PATCH] Only print "Available conditons:" section if conditions are available --- lambdaV.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lambdaV.py b/lambdaV.py index 54c2a64..e68fba4 100644 --- a/lambdaV.py +++ b/lambdaV.py @@ -515,7 +515,8 @@ def setup_and_run_task(start_field, start_position, start_heading, text, allowed draw_field() print("\n"+text) print("\nAllowed commands: "+", ".join(allowed_commands)) - print("\nAvailable conditions: "+", ".join(allowed_conditions)) + if len(allowed_conditions)>0: + print("\nAvailable conditions: "+", ".join(allowed_conditions)) result = evaluate_parser_result(parse_code(input("\nCode: "), allowed_commands, allowed_conditions)) print(result) time.sleep(3)