[Tutor] def_a

Alan Gauld alan.gauld at btinternet.com
Mon Mar 24 02:40:03 CET 2008


"elis aeris" <hunter92383 at gmail.com> wrote

> def_a =[
>         ["3.2.2.2.2.2.3.", "0.0.3.2.2.2.2.2.3.0.0.0.", "O"],
> ....
>         ["6.", "0.0.1.1.1.1.1.0.1.0.0.0.", "i"],
>         ["6.", "0.0.1.0.1.1.1.1.1.0.0.0.", "!"]
>       ]
>
> def returnzero:
>    return def_a[2]
>
> what I am trying to do is to write a generic function like this
>
> def returnzero (def_a):
>    return def_a
>
> in other words, a generic function that is able to use any list 
> assigned to
> it, so that i don't have to write 8 functions just to use 8 
> list,because
> that would be dumb, right?

Yes it would be dumb.

Do you have any other questions?
Have you tried the code? Did it work as expected?

Alan G. 




More information about the Tutor mailing list