Python basic

Keywords in Python programming language

Keywords in Python programming language

In this tutorial, we will discuss Keywords in Python programming language.

Key word in Python language

Key words are the reserved words in Python language Python is not allow use a keyword as a variable name or function name or any other identifier

and – The and keyword is used when all condition of boolean expression must be met

as – The as keyword is used when we want to give a module a different alias

assert – The assert keyword used to debugging purpose

break – The break keyword is used to interrupt the cycle if needed

class – The class keyword used to create new user define object

continue – The continue keyword is used to interrupt the cycle.

def – The def  keyword is used to create a user define function

del – Te del keyword is used to delete any object

elif – The elif keyword is used  with if instead else in other programming language

else – The else keyword is used with if and it is optional

expect – The expect keyword is used to exception handling for catches exceptions

False – False keyword represent negative or zero value of returns when evaluates boolean expression

finally – finally keyword is used to exception handling this keyword is optional and used in try block in Python language- Read more

for – The for keyword is used to controlling flow of the program until the particular condition is true – Read more

from – The from is a keyword in python wich is used to importing a specific variable, class or a function from a module –

global – The global keyword is used , when we access variable defined outside functions

if – The if keyword control flow of the program based in boolean expression(true/false)

import – The import keyword is used to importing other modules into a Python script

in – The in keyword is used with loop and to check if a container contains a value

is – The is keyword is used to object identity

lambda – The lambda keyword is used to creates a new anonymous function

none – the none keyword is used to refer a null value in Python language

nonlocal – the nonlocal keyword is used to refer a global value in Python language

not – The keyword not  is a logical operator in Python which is used to inverts the truth value

or – The keyword or is used to at least one condition must be met

pass – The pass keyword is a control statement in Python

raise – |The raise keyword is used to user define exception

return – the return key word is used s a statement to return from a function

True – The true keyword represent Positive or one value of returns when evaluates boolean expression

try – The try keyword is used to exception handling in Python

while – The while keyword is used to controlling flow of the program

with – In python, the with keyword is used when working with unmanaged resources

yield – The yield keyword is used with the generator- Read more

 

 

Suggested for you

Keywords in Java language

Keywords in Python language

Data type in C language

variables in C language

 

 

 

The enum keyword in Java programming language
Usage of Static in Java programming language
Karmehavannan

I am Mr S.Karmehavannan. Founder and CEO of this website. This website specially designed for the programming learners and very especially programming beginners, this website will gradually lead the learners to develop their programming skill.

Recent Posts

How to find reverse number using method in Java

How to find reverse number using method In this article, we will discuss the concept…

1 day ago

C# inverted full pyramid star pattern

C# inverted full pyramid star pattern In this article, we will discuss the concept of…

3 weeks ago

C# Full Pyramid star pattern program

C# Full Pyramid star pattern program In this article, we will discuss the concept of…

1 month ago

Program to count vowels,consonants,words, characters and space in Java

Program to count vowels, consonants, words, characters and space in Java In this article, we…

1 month ago

How to print multiplication table using Array in C++ language

How to print multiplication table using Array in C++ language In this post, we will…

1 month ago

C Program to multiplication table using Array

C Program to multiplication table using Array In this tutorial , we will discuss about…

2 months ago