Python Keywords में ऐसे special word होते हैं जिनका Python भाषा में पहले से एक Predefined meaning होता है। Python Interpreter इन words को पहचानता है और इनके अनुसार कार्य करता है।
Example :
if marks >= 40:
print("Pass")
| No. | Keyword | हिंदी में अर्थ | Uses (उपयोग) | Syntax |
|---|---|---|---|---|
| 1 | False | गलत | False keywords का use Boolean False value के लिए किया जाता है | | x = False |
| 2 | None | कोई value नहीं | Empty/Null keywords का use value दिखाने के लिए किया जाता है | | data = None |
| 3 | True | सही | True keywords का use Boolean True value के लिए किया जाता है | | x = True |
| 4 | and | और | and keywords का use दो conditions को जोड़ने के लिए किया जाता है | | condition1 and condition2 |
| 5 | as | के रूप में | as keywords का use Module को alias नाम देने के लिए किया जाता है | | import numpy as np |
| 6 | assert | पुष्टि करना | assert keywords का use Condition test और debugging के लिए किया जाता है | | assert condition |
| 7 | async | असिंक्रोनस | async keywords का use Async function बनाने के लिए किया जाता है | | async def function(): |
| 8 | await | इंतजार करना | await keywords का use Async task पूरा होने तक wait करने के लिए किया जाता है | | await function() |
| 9 | break | रोकना | break keywords का use Loop को तुरंत बंद करने के लिए किया जाता है | | break |
| 10 | class | वर्ग | class keywords का use Class बनाने के लिए किया जाता है | | class ClassName: |
| 11 | continue | जारी रखना | continue keywords का use Current loop को skip करके आगे बढ़ने के लिए किया जाता है | | continue |
| 12 | def | परिभाषित करना | def keywords का use Function बनाने के लिए किया जाता है | | def function_name(): |
| 13 | del | हटाना | del keywords का use Variable/Object delete करने के लिए किया जाता है | | del variable |
| 14 | elif | अन्य यदि | elif keywords का use दूसरी condition लगाने के लिए किया जाता है | | elif condition: |
| 15 | else | अन्यथा | else keywords का use Condition false होने पर code चलाने के लिए किया जाता है | | else: |
| 16 | except | अपवाद पकड़ना | except keywords का use Error handle करने के लिए किया जाता है | | except ErrorType: |
| 17 | finally | अंत में | finally keywords का use हमेशा execute होने वाला code के लिए किया जाता है | | finally: |
| 18 | for | के लिए | for keywords का use Loop चलाने के लिए किया जाता है | | for x in sequence: |
| 19 | from | से | from keywords का use Module से specific चीज import करने के लिए किया जाता है | | from math import sqrt |
| 20 | global | वैश्विक | global keywords का use Global variable access करने के लिए किया जाता है | | global variable |
| 21 | if | यदि | if keywords का use Condition check करने के लिए किया जाता है | | if condition: |
| 22 | import | आयात करना | import keywords का use Library/Module import करने के लिए किया जाता है | | import module |
| 23 | in | में | in keywords का use Membership check करने के लिए किया जाता है | | "a" in "apple" |
| 24 | is | है | is keywords का use Object identity check करने के लिए किया जाता है | | x is None |
| 25 | lambda | अनाम function | lambda keywords का use छोटा function बनाने के लिए किया जाता है | | lambda x: x+1 |
| 26 | nonlocal | स्थानीय के बाहर | nonlocal keywords का use Outer function variable access करने के लिए किया जाता है | | nonlocal variable |
| 27 | not | नहीं | not keywords का use Condition को reverse करने के लिए किया जाता है | | not condition |
| 28 | or | या | or keywords का use किसी एक condition के True होने पर किया जाता है | | condition1 or condition2 |
| 29 | pass | खाली छोड़ना | pass keywords का use Empty code block बनाने के लिए किया जाता है | | pass |
| 30 | raise | उत्पन्न करना | raise keywords का use Exception/Error बनाने के लिए किया जाता है | | raise Exception() |
| 31 | return | वापस देना | return keywords का use Function से value return करने के लिए किया जाता है | | return value |
| 32 | try | प्रयास | try keywords का use Error handling शुरू करने के लिए किया जाता है | | try: |
| 33 | while | जब तक | while keywords का use Condition आधारित loop के लिए किया जाता है | | while condition: |
| 34 | with | के साथ | with keywords का use File/resource management के लिए किया जाता है | | with open("file") as f: |
| 35 | yield | उत्पन्न करना | yield keywords का use Generator बनाने के लिए किया जाता है | | yield value |
