Using Python I would like some assistance with this Funtion
Using Python : I would like some assistance with this Funtion from the describe information:
Q: Function Design Recipe Following the Function Design Recipe, write a function that satisfies this description: This function returns a string containing a given word repeated a given number of times. For example, someone should be able to call the function to repeat \"Marcia \" three times and the function should return \"Marcia Marcia Marcia \", or call the function to repeat \"Buffalo \" eight times and have it return \"Buffalo Buffalo Buffalo Buffalo Buffalo Buffalo Buffalo Buffalo \".
Solution
def func(str,count):
li=[]
for i in range(count):
li.append(str)
return li
print func(\'maria\',5)
it will print [\'maria\', \'maria\', \'maria\', \'maria\', \'maria\']
