Advertisements
Advertisements
प्रश्न
Write one example of the following in Python:
Syntax Error
अति संक्षिप्त उत्तर
Advertisements
उत्तर
if x = 50:
print("Hello")
In this statement, the assignment operator (=) is used instead of the comparison operator (==). This results in a syntax error because Python does not allow assignment in a condition.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2024-2025 (March) Set 4
