Cursor Function In Python With Parameters