How to return only ASA amount and not Seq?

I have this function which returns the amount of some ASA in a smart contract :

def get_amount()
    asset_holding = AssetHolding.balance(
        Global.current_application_address(), App.globalGet(Bytes("asset_id"))
    )
    return Seq(
            asset_holding,
            asset_holding.value()
			)

The issue is that the callers of this function just need the amount (asset_holding.value()) and not a Seq.
How can I return only the amount and not a Seq object ?

I really need to keep a function because my function is actually more complicated (it has an If/Else) but the point is to be able to return an Exp containing only the amount in all cases.

I’m not sure what conditions you’re calling this function under but when writing PyTeal everything is written in terms of Expressions. The caller should not care about whether or not the value is wrapped in a seq as long as it evaluates to the desired value.

Ben

I want a condition Exp like this :
tx.amount() >= asset_holding.value() + Int(1)
to be used in a And expression for example.

you can call the method you’ve defined and it essentially collapses to the expression you’ve got there. Give it a shot