Slicing Function In Python With Parameters