<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="+1"><font face="monospace">try<br>
---------------------------------------<br>
#!/usr/bin/env python<br>
from types import ListType, IntType<br>
<br>
def array_expander( ar=None, ex=None ):<br>
if type( ex ) != IntType:<br>
return []<br>
if ex <= 0:<br>
return []<br>
if type( ar ) != ListType:<br>
return []<br>
# working code starts here #<br>
res = []<br>
for t in ar:<br>
for x in range( ex ):<br>
res.append( t )<br>
return res<br>
# function ends #<br>
<br>
res = array_expander( [1,11,3,5], 4 )<br>
<br>
print res<br>
---------------------------------------<br>
[1, 1, 1, 1, 11, 11, 11, 11, 3, 3, 3, 3, 5, 5, 5, 5]<br>
</font></font>
<div class="moz-signature"><br>
<br>
<br>
-- <br>
<b>Kiri-kin-tha's</b> First Law of Metaphysics is <i>"Nothing unreal
exists."</i></div>
</body>
</html>