-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtuple_test.py
More file actions
67 lines (61 loc) · 1.28 KB
/
tuple_test.py
File metadata and controls
67 lines (61 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
__author__ = 'k22li'
#
#aStr = '1000001010010000'
#bStr = 'itdfgdceatonqrdi'
#
#for k, v in zip(aStr, bStr):
# print k, v
#
#a, b = [['ac', 'ef'], ['bd', 'hg']]
#
#print a, '\n', b
#
#
#for item in a:
# print item
#theList = ['X...', '..X.', 'X..X', '....']
#
#def joinListToString(arr):
# """
# Function: convert each of the list contents into long string
# """
# newStr = ''
# for elem in arr:
## print elem
# newStr = newStr + elem
# newStr = newStr + elem
# return newStr
#
#
#t = joinListToString(theList)
#
#print t
#
#alist = [['a'],['b'],['c'],['d']]
#
#print [ele for ele in [item.pop() for item in alist]]
#
#print list('abcd')
#arr = ['X...',\
# '..X.',\
# 'X..X',\
# '....']
#
#arr = [list(item) for item in arr]
#
#new_arr = [[r[col] for r in arr] for col in range(len(arr[0]))]
#print new_arr
#[item.reverse() for item in new_arr]
#print new_arr
a = [1, 2, 3, 4]
a[2] = a[0]
print 'asdbd %d'%20
optionDict = {}
legalParams = ['Automatic', 'Manual', 'Off'] #the order are not to change
#assert setMode in legalParams, 'illegal params in using for method: _setMmsRetrievalMode()'
for val, key in enumerate(legalParams):
optionDict[key] = val
print val, type(val), key, type(key)
print optionDict
x = None
print x == None