Avatar ·

Numerical solution of the heat conduction problem

📁 Advanced Python Topics, question, Error, example, AI

It is necessary to solve the heat conduction problem on the interval

When solving, I used an explicit scheme

N = 10 # maximum number of steps along xK = 10 # maximum number of steps along tl = 1 # value of x at the right boundaryh = l / N # grid step along xT = 1 # maximum time value t at the right boundaryt = T / K # time grid step# define the grid x_i = np.arange(0, N, h) # values at nodes along xt_j = np.arange(0, K, t) # values                    
Avatar ·

Still, Python is dynamic and expressive. You can't take that away from it.

There are some .

Here's your one-liner:

result=list(set(Ans) & set(Word))

This will give the intersection of both lists:

['red', 'white']

If you need a list of unique elements in the union of two lists:

['red', 'white', 'green', 'blue']result = list(set(Ans + Word))

Symmetric differen

Log in to leave an answer

Blogs