Category: Python Syntax and Style

Python Syntax and Style

del Statement

del Statement

The del statement removes a single reference to an object, and its syntax is:   del obj1[, obj2[, … objN… ]]   For example, executing del foo2 in the example above has two results:...

Memory Allocation

Memory Allocation

As responsible programmers, we are aware that when allocating memory space for variables, we are borrowing system resources, and eventually, we will have to return that which we borrowed back to the system. Happily,...

Identifiers

Identifiers

Identifiers are the set of valid strings which are allowed as names in a computer language. From this all-encompassing list, we segregate out those which are keywords, names that form a construct of the...

Comments ( # )

Comments ( # )

First thing’s first: Although Python is one of the easiest languages to read, it does not preclude the programmer from proper and adequate usage and placement of comments in the code. Like many of...

Statements and Syntax

Statements and Syntax

Statements and Syntax Some rules and certain symbols are used with regard to statements in Python:   Hash mark ( # ) indicates Python comments NEWLINE ( n ) is the standard line separator...