HF RL Explorer

Task: Implement Conditional Logic in Python Lambda Functions

Task: Implement Conditional Logic in Python Lambda Functions: a task in Terminal-Lego-15k (Harbor dataset). In Python, lambda functions are limited to single expressions and cannot contain statements like if-else blocks, print statements (in Python 2), or raise statements directly. However, Python…

The task

In Python, lambda functions are limited to single expressions and cannot contain statements like `if-else` blocks, `print` statements (in Python 2), or `raise` statements directly. However, Python supports conditional expressions (ternary operator) that can be used within lambda functions.

Part of PrimeIntellect/Terminal-Lego-15k.