Archive for March, 2016

Python Cheatsheet (v 2.7)

Tuesday, March 29th, 2016

Here’s a few quick references for python developers.

Here are some python tips & tricks that can be useful for beginners.

Merge tuples

t1 = ('a','b','c') 
a1 = ['j','k'] 
result = t1+tuple(a1)
# result == ('a','b','c','j','k')

# note here I'm converting a list into tuple right away - so you can mix/match tuples/lists this way

(more…)