Info: Few Syntax issues

Indentation : Beware of tabulations and spaces! Indentation separates the code blocks, like this:

There are no semicolons at the end of the lines and everything within a block should have same indentation.

No need to declare data types or variables (only defining globals, if needed).

Creating a list:

L = [1,2,3]

L = [u'Steffi', u'Erna', u'Rolf']

Text strings must be defined as unicode, otherwise the mobile phone can not display the characters. -> u'Steffi'

 

Checking what functions a module contains:

import time
dir(time) # to get info what the functions are within the module time

 

 

 

 

 

 

 

 

 

Previous|Next  | Menu        Copyright (c) 2006 Jurgen Scheible