[ create a new paste ] login | about

Link: http://codepad.org/FtMW3sln    [ raw code | output | fork ]

Python, pasted on Aug 10:
1
2
3
4
5
6
7
8
9
10
11
def myfunc (input_str):
    i = 1;
    for x in input_str:
        if (i%2 !=0):
            x.lower()
        else:
            x.upper()
        i = i+1
    print (input_str)

myfunc('hello world')


Output:
1
hello world


Create a new paste based on this one


Comments: