Python 3, Part 4 (Slicing)

Tutorials about Python 3, the scripting language for Blender 2.5

Python 3, Part 4 (Slicing)

Postby irakrakow » Wed Mar 10, 2010 10:40 am

Watch the Video: http://www.youtube.com/watch?v=ylyc1UFE3VM

Read the Script: http://blender3dvideos.blogspot.com/2010/03/python-3-part-4-slicing.html

In Part 3, we were introduced to lists, which lets us work with more than one variable at once. We also saw how to reference parts of the list, say the 3rd element in the list x as x[2] (since we start numbering from 0), using the [] operator, and how to use negative numbers to reference list elements from the end. In this tutorial, we will go into more detail about how to get parts of strings and lists, by use of slicing. Slicing also uses the square brackets, but in a new and different way.
User avatar
irakrakow
Site Admin
 
Posts: 438
Joined: Fri Jan 22, 2010 9:01 pm

Return to Python 3

Who is online

Users browsing this forum: No registered users and 1 guest