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 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

PHP Star Triangle pattern program

PHP Star Triangle pattern program In this tutorial, we will discuss about PHP Star Triangle…

1 month ago

PHP Full Pyramid pattern program

PHP Full Pyramid pattern program In this tutorial, we will discuss about PHP Full Pyramid…

1 month ago

5 methods to add two numbers in Java

5 methods to add two numbers in Java In this tutorial, we will discuss the…

2 months ago

Python Full Pyramid star pattern program

Python full Pyramid star pattern program In this tutorial, we will discuss  the concept of…

5 months ago

Write a function or method to convert C into F -Entered by user

Write a function or method to convert C into F -Entered by the user In…

9 months ago

How to write a function or method to convert Celsius into Fahrenheit

How to write a function or method to convert Celsius into Fahrenheit In this tutorial,…

9 months ago