Skip to content

Commit 2b75d37

Browse files
author
Jan Beilicke
committed
Initial commit
0 parents  commit 2b75d37

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

test.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env python
2+
import re
3+
4+
#print '\nPattern matching:'
5+
#m = re.search('(?i)foo', 'blaFoobar')
6+
#print m.group(0)
7+
8+
#print '\nSimple calculation:'
9+
#print '1 + 2 =', 1+2
10+
11+
print '\nLists:'
12+
a = [1,7,4,2,1,5,3]
13+
#for i in a:
14+
# print i
15+
#print 'end'
16+
17+
a.reverse()
18+
for i in a:
19+
print i
20+
print '.'
21+
22+
a.sort()
23+
for i in a:
24+
print i
25+
print '.'
26+
27+
print 'Items before:', len(a)
28+
a.append(9)
29+
print 'Items after:', len(a)
30+
31+
print 'Values within keys 2-5 (excl.):', a[2:5]
32+
33+
print a.pop(1)
34+
print '.'
35+
36+
b=(6,8)
37+
a.extend(b)
38+
a.sort()
39+
40+
for i in a:
41+
print i
42+
print '.'
43+
44+
print '-----------'
45+
def bla():
46+
return
47+
48+
foo = bla()
49+
50+
for i in foo:
51+
print i
52+
print '.'

0 commit comments

Comments
 (0)