Analog joy movement wrong way?

Hi can anyone help me?

I’m trying to get a cube analogic rotation on Z axis, this is my code:

import bge

cont = bge.logic.getCurrentController()
own = cont.owner

sen = cont.sensor[‘UP’]
movement = sen.axisValues

left_right = movement[0]
UP.treshold = 1000

Motion = cont.actuators[‘Motion’]

angle = own[‘angle’]
left_right = own[left_right’]

if UP.positive and angle > UP.treshold:
own[‘angle’] += left_right
Motion.dRot = ([0.0, 0.0, own[‘angle’])])
cont.activate(Motion)

Seems to be wrong, but i don’t understand where,please let me know how to solve my problem.
Thank you.

Here another code,can explain please?

def movePlayer(joystick, object):
#print (joystick.name)
#print (joystick.axisValues)
analogStick = joystick.axisValues[0:3] (expecially here i dont understant what the list [0:3] is referred to)
position = analogStick
position[0] -= 5
object.worldPosition = position

object['buttons']=str(joystick.activeButtons)

ty

Please, there’s no one?