629
Comment: Added syntax colouring.
|
341
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Here are some samples to help get a better idea of Python's syntax: String formatting {{{#!python numbers=disable name = 'Monty' print 'Hello, %s' % name }}} Defining a function {{{#!python numbers=disable def add_one(x): return x + 1 }}} Defining a class with two methods {{{#!python numbers=disable class Talker(object): def greet(self, name): print 'Hello, %s!' % name def farewell(self, name): print 'Farewell, %s!' % name }}} Defining a list {{{#!python numbers=disable dynamic_languages = ['Python', 'Ruby', 'Groovy'] dynamic_languages.append('Lisp') }}} |
49 yr old Grain, Oilseed or Field Gardener (Australia) / Field Crop Gardener (New Zealand ) Kilcullen from Corner Brook, has lots of interests including beatboxing, free microsoft codes and tesla coils. that contained visiting Srebarna Nature Reserve.<<BR>> <<BR>> My weblog :: [[http://www.freemicrosoftpointscodes.org/|free ms codes]] |
49 yr old Grain, Oilseed or Field Gardener (Australia) / Field Crop Gardener (New Zealand ) Kilcullen from Corner Brook, has lots of interests including beatboxing, free microsoft codes and tesla coils. that contained visiting Srebarna Nature Reserve.
My weblog :: free ms codes