Python glossary

From ZENotes
(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
  
 
A value is one of the fundamental things — like a word or a number — that a program manipulates
 
A value is one of the fundamental things — like a word or a number — that a program manipulates
 
  
 
objects are classified into different classes, or data types: 4 is an integer, and "Hello, World!" is a string
 
objects are classified into different classes, or data types: 4 is an integer, and "Hello, World!" is a string
 
  
 
The type converter float can turn an integer, a float, or a syntactically legal string into a float
 
The type converter float can turn an integer, a float, or a syntactically legal string into a float
  
 +
The int function can take a floating point number or a string, and turn it into an int
 +
 +
len is a built-in Python function that returns the number of characters in a string
  
The int function can take a floating point number or a string, and turn it into an int
 
  
 
A statement is an instruction that the Python interpreter can execute.  
 
A statement is an instruction that the Python interpreter can execute.  

Revision as of 13:07, 1 May 2013

Back to Python

A value is one of the fundamental things — like a word or a number — that a program manipulates

objects are classified into different classes, or data types: 4 is an integer, and "Hello, World!" is a string

The type converter float can turn an integer, a float, or a syntactically legal string into a float

The int function can take a floating point number or a string, and turn it into an int

len is a built-in Python function that returns the number of characters in a string


A statement is an instruction that the Python interpreter can execute. We have only seen the assignment statement so far. Some other kinds of statements that we’ll see shortly are while statements, for statements, if statements, and import statements. (There are other kinds too!)

An expression is a combination of values, variables, operators, and calls to functions. Expressions need to be evaluated. If you ask Python to print an expression, the interpreter evaluates the expression and displays the result.


Back to Python

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox