Skip to content

Instantly share code, notes, and snippets.

View Visgean's full-sized avatar

martin Visgean

View GitHub Profile
@Visgean
Visgean / equality_creates_reference.py
Created July 14, 2011 13:54
Getting copy of lists or objects in python
>>> a = ["a","b","c"]
>>> b = a
>>> b.append("d")
>>> print a, b
['a', 'b', 'c', 'd'] ['a', 'b', 'c', 'd']
# Easiest way:
# But it is without support for complex number.
from math import factorial
factorial(6)