Important Notice:

Assignment Statement

Assignment Statement

23 views 1 min read

Assignment Statement —

Assignment Statement का मतलब है किसी variable को कोई value देना (assign करना)। Python में = sign का उपयोग इसके लिए किया जाता है।

जब हम a = 10 लिखते हैं, तो Python पहले 10 value को memory में रखता है, फिर variable a को उस value से जोड़ (link कर) देता है। यहाँ = का मतलब गणित (maths) वाला "बराबर" नहीं है, बल्कि इसका मतलब है — "दाईं तरफ की value को बाईं तरफ के variable में डालो (assign करो)"।

English:
An Assignment Statement is used to give (assign) a value to a variable. In Python, the = sign is used for this purpose. When we write a = 10, Python first stores the value 10 in memory, then connects the variable a to that value. Here, = does not mean "equal to" like in maths — it means "put the value on the right side into the variable on the left side."

Syntax (तरीका):

variable_name = value

Example-

a=5

print(a)

Output-

5

 

Related Notes