Smooth turning

Here’s the part of my code that drives movement on my player. It works fine, just that I couldn’t figure out a way to smooth out the turning. It can get especially jerky because as the game goes on the player speeds up. So does anyone know how to smooth out the turning? Thanks in advance

function Update() {
    	if (Input.GetKey ("left")) {
    		transform.Rotate(0, -Time.deltaTime*turnspeed, 0);
    	if (Input.GetKey ("right")) {
    		transform.Rotate(0, Time.deltaTime*turnspeed, 0);

You could do it like this:

float targetRotation = Input.GetAxis("Horizontal");
transform.Rotate(0, targetRotation * 100 * Time.deltaTime, 0);

Instead of transform.Rotate(), use something like:

Vector3 targetRotation = transform.rotation.eulerAngles;
		if (Input.GetKey("left"))
			targetRotation.y = -1;
		if (Input.GetKey("right"))
			targetRotation.y = 1;
		transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.Euler(targetRotation), Time.fixedDeltaTime * turnspeed);