0% found this document useful (0 votes)
25 views12 pages

PYTHON Keywords Explanation

The document discusses keywords in the Python programming language including assert, break, class, continue, def, del, elif, else, except, finally and global. It provides short descriptions of what each keyword is used for in Python code.

Uploaded by

Karen Engativa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views12 pages

PYTHON Keywords Explanation

The document discusses keywords in the Python programming language including assert, break, class, continue, def, del, elif, else, except, finally and global. It provides short descriptions of what each keyword is used for in Python code.

Uploaded by

Karen Engativa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

PYTHON

KEYWORDS
Vocabulary Extension
Assert: reivindicar
It is used when debugging code. It lets you test if a condition in
your code returns True, if not, the program will raise an Error.
Break: romper

It terminates the current loop and resumes


execution at the next statement. It can be used in
both while and for loops.
Class: clase

A template for creating user-defined objects.


Continue: continuar

• It is used to end the current iteration in a for loop


or a while loop and goes to the next iteration.
Def (definition): definición

It marks the start of the function header. A function


name to uniquely identify the function.
Del (delete): borrar

It can be used to erase an item at a given index and to


remove slices from a list.
Elif (else … if): si….. si no

It is the same as "else if" in other programming


languages.
Else: si no
• It is used in conditional statements (if statements), and decides
what to do if the condition is False.
Except: excepto

It is used to catch and handle the exception(s) that are


encountered in the try clause.
Finally: finalmente
It is always executed after try and except blocks. It always executes after
normal termination of try block or after try block terminates due to some
exception.
global

It allows you to modify the variable outside of the


current scope.

You might also like