-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay1.py
More file actions
56 lines (46 loc) · 861 Bytes
/
Day1.py
File metadata and controls
56 lines (46 loc) · 861 Bytes
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
__author__ = 'Prateek'
from sys import argv
open(argv[0])
with open(argv[0]) as fp:
print fp
'''
#l = ['pam' , '5', 'charlie' , '9' ,'kim' ]
#l.reverse()
#l.sort(reverse=False)
print l
for item in sorted(l,reverse=True):
print item
mat = [ [1,2,3], [4,5,6], [7,8,9] ]
print [row[1] for row in mat]
l = range(0,8)
#shuffle(l)
res = [i ** i for i in l]
print res
'''
'''
def center(string_content, width, fill):
num_fill = width-len(string_content)
print fill*int(num_fill/2),
print string_content,
print fill*int(num_fill/2)
center('pppp',10,"-")
'''
'''
def demo(*args):
print args
demo(1)
demo("peter")
demo(1,"pam",3,4,5,6,7,)
l = [1,2,3]
m = (5,6,7)
demo(l)
demo(m)
demo(*l)
demo(*m)
'''
'''
name,age = "pam",2
print ("I am {}, {} years old").format(name,age)
l = ("pam",2)
print ("I am {}, {} years old").format(*l)
'''