0

I want to build a function the output should look like this:

Input: print (func('abcd')) Output: ['a','b','c','d']

19th May 2017, 2:16 PM
lars
1 Resposta
+ 1
def func(string): result = []; for letterIndex in range(0, len(string)): result.append(string[letterIndex]); return result; print(func("abcd"));
19th May 2017, 2:59 PM
Ralf Sild