human
Count the total number of triangles after Nth operation | Function to return the total no . of Triangles.
For every subtriangle formed there are possibilities of generating ( curr * 3 ) + 2.
Changing the curr value to Tri_count ;"
How can the above be solved in Python?

=====
Give me a code to count the total number of triangles after Nth operation and the other steps required?
assistant
#Here is code to count the total number of triangles after Nth operation and the other steps required.
 def countTriangles ( n ) :
	curr = 1
	Tri_count = 0
	for i in range ( 1 , n + 1 ) :
		Tri_count = ( curr * 3 ) + 2
		curr = Tri_count
	return Tri_count
/ * Driver code * /
n = 10
print ( countTriangles ( n ) )