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

This is an old revision of the document!


Python basics

Variables

Python variables are very easy to set up and very flexible.

a = 10
print(a)
# 10
 
a = 2.5
print(a)
# 2.5
 
a += a
print(a)
# 5.0
 
a = [ 1, 2, 3, 4, 5 ]
print( a[2] )
# 3
 
len(a)
# 5
 
a = "hello"
a += " world"
print(a)
# hello world
 
len(a)
# 11
 
print(a[10])
# d
workshops/blender/python_basics.1434666233.txt.gz · Last modified: 2015/06/19 00:23 by Julien Deswaef