Float object is not iterable I am new to blender and attempted to create a new mesh in my script however it is saying that the values are floats. I have tried converting to a vector but it still did not work. What is the error?

def execute(self, context):
    obj = context.active_object
    if obj.mode == 'EDIT':
        bm = bmesh.from_edit_mesh(obj.data)
        vertices = bm.verts

    else:
        vertices = obj.data.vertices

    verts = [obj.matrix_world * vert.co for vert in vertices] 

    plain_verts = [vert.to_tuple() for vert in verts]
    print(plain_verts)
    rdomain_list = [x[0] for x in plain_verts]
    domain_list = rdomain_list[:]

    ry_list = [x[1] for x in plain_verts]
    y_list = ry_list[:]

    rz_list = [x[2] for x in plain_verts]
    z_list = rz_list[:]


    numX = 3


    x = domain_list[numX]+2
    y = ry_list[numX]+2
    z = rz_list[numX]
    verts = [[x, y, z]]
    for i in range (0, numX):
            x = domain_list[numX]+2
            y = ry_list[numX]+2
            z = rz_list[numX]
            vert = [x,y,z]
            verts.extend(vert)
    faces = [[0, 1, 2]]
    me = bpy.data.meshes.new("pmesh")
    objectme = bpy.data.objects.new("pmesh", me)
    bpy.context.scene.objects.link(objectme)

    #The error is in the following line.
    me.from_pydata(verts, [], faces)
    me.update(calc_edges = True)
    objectme.location.x = px
    objectme.location.y = py
    objectme.location.z = pz
    return objectme


The error says 

File "C:\...operator.py" in line 95, in execute me.from_pydata(verts, [], faces)   Files"C:\Program Files\...modules\bpy_types.py", in line 412, in from_pydata vertices_flat = [f for v in vertices for f in v]
Your error comes from this bit

verts = [[1, 2, 3]]

for i in range(0, 3):
    vert = [1, 2, 3]
    verts.extend(vert)

print(verts)
#[[1, 2, 3], 1, 2, 3, 1, 2, 3, 1, 2, 3]


you want to use verts.append(vert)

If you use append you will have 4 verts  and your faces has [0, 1, 2] are you trying to build a mesh with a triangular face and a hanging vert?