Skip to content

Commit 19f5ace

Browse files
committed
new: function: multiple return, parameters in list. lit: line. str split
1 parent 8cfd020 commit 19f5ace

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

core_function/params/list.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
def function( first, second ):
3+
print 'first = ' + first
4+
print 'second = ' + second
5+
6+
7+
function( "asdfgh", "12312312" )
8+
print
9+
10+
function( second = "asdfgh", first = "12312312" )
11+
print
12+
13+
function( **{ 'second': 'qwertyuip', 'first': '1234567890'} )

core_function/ret_multi.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/python
2+
3+
# Function definition is here
4+
def multiple( ):
5+
6+
return 'asdas', '123123';
7+
8+
9+
name, ext = multiple();
10+
11+
print name
12+
print ext

core_types/list/size.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env python
2+
3+
a = ['a', 'b', 'c']
4+
5+
print 'len(a) = %i ' % len(a)

core_types/str/split.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env python
2+
3+
s = 'asdasda|asdasda|asdasda|asdasd|123123'
4+
5+
print str.split( s, '|' )

0 commit comments

Comments
 (0)