Splice Method Syntax Python If Functions Matlab