Learn how to use reference variables to store and reuse data from function responses
CheckRoomAvailability
Function.
rooms_available
and defined with:
response.available_rooms
val is not none and val|length > 0
rooms_available
variable will be True whenever the returned list has a length greater than zero. You can then write:Prefix Variables
user_is_compliant
vs. is_compliant
Short-circuit logic
val is not none and val|length > 0
Functions consideration