Debian Codegraph @

pypy/interpreter/test/s1.py

raw symbols SCIP
1
2 ### a trivial program to test strings, lists, functions and methods ###
3 ## tiny change wrt goal so far needed: explicit parameter to str.split
4
5 def addstr(s1,s2):
6 return s1 + s2
7
8 str = "an interesting string"
9 str2 = 'another::string::xxx::y:aa'
10 str3 = addstr(str,str2)
11 arr = []
12 for word in str.split(' '):
13 if word in str2.split('::'):
14 arr.append(word)
15 print ''.join(arr)
16 print "str + str2 = ", str3
17
18