Evaluate a function on a set of vertices

Hi everyone!
I want to change the values of a function on a set on vertices. I tried

from fenics import *
from mshr import *
import numpy as np
from dolfin import *


channel = Rectangle(Point(-10.0, -11), Point(20.0, 11))
Q = FunctionSpace(mesh, 'CG', 1)

prueba=Function(Q)
zero=Constant(0)
prueba=project(zero,Q)

coor = mesh.coordinates()
dof = coor.shape[0]

points_refine=np.zeros(dof)
for v in vertices(mesh):
    x = v.point().x()
    y = v.point().y()
    if (x<12 and y<3 and x>-3 and y>-3):
        prueba.vector()[v.index()]=1




but, doens’t work…
Anyone can help me?

Thank you

See: Mapping from mesh.coordinates() to u.vector() - #2 by dokken