The following examples show how to define list data container, list operations and list built-in methods in Python. Define lists Python Code: def TestList(): # Lists are ordered sequence of items that can be repeated # list is mutable data structure that can be changed in place (inside loops, functions, etc) # Define empty list: L = [] print 'L = ', L # List elements are separated by comma and contained in ...
Updated 05-10-2010 at 07:49 PM by Rajaa
Welcome to Python! This is the first in a series of examples to help beginners get started with Python using Rhino built-in Python script editor. I hope to cover basic Python syntax to start with, but will also show how to use RhinoScript package and eventually RhinoCommon with all the goodies that the Rhino geometry engin has to offer. This article covers basic control flow tools like "if" statement, loops "for" and "while" and range() ...
Updated 11-14-2012 at 03:54 PM by Rajaa