xuv's notebook

Side notes, howtos and random bits of information related to Julien Deswaef's projects

User Tools

Site Tools


workshops:blender:python_basics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
workshops:blender:python_basics [2015/06/20 23:24] Julien Deswaefworkshops:blender:python_basics [2015/06/20 23:29] (current) – [Loops] Julien Deswaef
Line 112: Line 112:
 # o # o
 </code> </code>
 +
 +If you really need to get an index, it's possible to construct it with the function ''enumerate()''
 +<code=python>
 +for index, letter in enumerate(msg):
 +    print( str(index) + ": " + letter)
 +
 +# 0: h
 +# 1: e
 +# 2: l
 +# 3: l
 +# 4: o
 +</code>
 +
  
 ===== Useful things ===== ===== Useful things =====
workshops/blender/python_basics.1434835475.txt.gz · Last modified: 2015/06/20 23:24 by Julien Deswaef