# HG changeset patch # User Santosh G. Vattam # Date 1251286182 -19800 # Node ID b81255d096abef6618777458d7a8a469872cdc67 # Parent ccdbbc09457916231febe8f3500e4c0d5879bfe9 Added Variables section. diff -r ccdbbc094579 -r b81255d096ab basic_python/intro.rst --- a/basic_python/intro.rst Wed Aug 26 16:29:14 2009 +0530 +++ b/basic_python/intro.rst Wed Aug 26 16:59:42 2009 +0530 @@ -384,5 +384,28 @@ Python provides a datatype for complex numbers. Complex numbers are initialized as shown in the example above. The *real* and *imag* operators return the real and -imaginary parts of the complex number as shown. The *abs()* returens the absolute -value of the complex number. \ No newline at end of file +imaginary parts of the complex number as shown. The *abs()* returns the absolute +value of the complex number. + +Variables +~~~~~~~~~ + +Variables are just names that represent a value. Variables have already been +introduced in the various examples from the previous sections. Certain rules about +using variables: + + * Variables have to be initialized or assigned a value before being used. + * Variable names can consist of letters, digits and underscores(_). + * Variable names cannot begin with digits, but can contain digits in them. + +In reference to the previous section examples, 'a', 'b', 'lng', 'fl', 'e' and 'cplx' +are all variables of various datatypes. + +:: + + Note: Python is not a strongly typed language and hence an integer variable can at a + later stage be used as a float variable as well. + +Strings +~~~~~~~ +