In [1]:
pin = "881120-1078234"
In [3]:
yyyymmdd = pin[:6]
num = pin[7:]
In [4]:
print(yyyymmdd)
print(num)
In [6]:
pin = "881120-1068234"
print(pin[7])
In [9]:
a = [1, 3, 5, 4, 2]
a.sort()
a
Out[9]:
In [10]:
a.reverse()
a
Out[10]:
In [12]:
a = ['Life', 'is', 'too', 'short']
result = " ".join(a)
print(result)
In [18]:
a = (1, 2, 3)
a = a + (4,)
print a
In [25]:
a = {'A':90, 'B':80, 'C':70}
result = a.pop('B')
print (result)
print (a)
In [27]:
a = [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5]
aSet = set(a)
print aSet
In [30]:
a = b = [1, 2, 3]
a[1] = 4
print b
In [31]:
a = [1, 2, 3]
b = a[:]
a[1] = 4
print b
In [ ]:
In [ ]:
In [ ]: