Remove["Global`*"]

vyr=a+b*c

ReplaceAll

z Helpu: expr /. rules
applies a rule or list of rules in an attempt to transform each subpart of an expression expr.

vyr/.a->1

ReplaceAll[vyr,a->1]

TreeForm[vyr];

listb3={b,{b,{b}}}

Replace[listb3,b->1,2]

Replace[listb3,b->1,{2}]

ReplaceAll
ReplaceRepeated

{0.1m,20cm}/.{m->1,cm->0.01m}

{0.1m,20cm}//.{m->1,cm->0.01m}

{1,2}/.{1->a}

a+b+c//FullForm

a+b+c/.Plus->Times

{{1,2},{3,4}}/.List->Plus

Replace[{{1,2},{3,4}},List->Plus,{2}]

{{1,2},{3,4}}/.{a_?NumericQ,b_?NumericQ}:>a+b

rules=Table[{x->i},{i,10}]

x/.rules

sol=Solve[x^3-7x-6==0,x]

x/.sol

{x1,x2,x3}=x/.sol

(Sqrt[x1])+x2^2+x3^3

Pattern
PatternTest
Hyperlink["Kniha: Patterns","https://www.wolfram.com/language/elementary-introduction/2nd-ed/32-patterns.html"]

{1,2,4}/._->5

{1,2,4}/._Integer->5

{1,2,4}/.b:_Integer->5

{1,2,4}/._?NumericQ->5

{1,2,4}/._?NumberQ->5

{1,2,10,34,234}/._?(#>3&)->5

a=100

{1,2,4}/.{a_,b_,c_}->{a,b,c}

vys={1,2,4}/.{a_,b_,c_}:>{10*a,b,c}

{1,2,4}/.{a_,b_,c_}->7

{1,54,346}/.b_->5

ClearAll[a]

{1,{a,b},{0.5,2}}/.{0.5,2}->x

{1,{a,b},{0.5,2}}/.{_?NumericQ,_?NumericQ}->x

{1,{a,b},{Round[0.5],2}}

a=100

{1,{a,b},{0.5,2}}/.{a_?NumericQ,b_?NumericQ}:>{Round[a],b}

ClearAll[f,a]

Set
SetDelayed
Functional Programming

f[a_]=x/.FindRoot[Cos[x]==a*x,{x,0}]

f[a_?NumericQ]:=x/.FindRoot[Cos[x]==a*x,{x,0}]
f[a_List]:=f/@a
f[a_?(Head[#]==List&)]:=f/@a

Plot[f[a],{a,1,2}]

f[{1,24,2}]