a1exlism
7/23/2016 - 2:24 PM

Collection the differences in python when reading <<Python core programming>>

Collection the differences in python when reading <>

#Array
aList = [1, 2, 3, 4]
aList[2:] #[3, 4]

#Variables
a = 1
a++ --a # Wrong no function for this

# mul-tuple
(x, y, z) = (1, 2, 'a string')

# using mul-tuple to exchange two variables
x, y = 1, 2
x, y = y, x #2, 1

# about underline   from: http://python.jobbole.com/81129/
_xxx      # declare Private
__xxx     # avoid the conflict with subClass's name
__xxx__   # System Variables

'''
    Tab need to be replaced by 4-space
'''

# Slice Object
sequence[startIndex, endIndex, Length]