| Reply | « Previous Thread | Next Thread » |
|
I am trying to return a parameter but it seems imposible through functions in python.
any ideas ? |
| titov.enthu |
| View Public Profile |
| Find all posts by titov.enthu |
|
Hi Titov,
How do you return a parameter ? Use the following structure and return statement, Code:
def fun(): a=5 return a b=fun() Croozeus |
|
You can also return tuples, arrays or dictionaries if you want multiple outputs:
Code:
def swap(x, y):
return y, x
(x, y) = swap(2, 1)
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Python for S60 1.4.0 released | jplauril | Python | 43 | 2009-05-24 10:22 |
| How to port Symbian OS String Descriptors | birol.sekerci | General Symbian C++ | 17 | 2007-11-08 17:24 |
| 求助:电话本人名如何按照拼音排序~~ | Kiss_Fish | Symbian | 5 | 2006-06-15 10:22 |
| CMdaAudioOutputStream Not working with EXEDLL target | fnagaton | General Symbian C++ | 6 | 2005-10-03 06:51 |
| 关于Float的问题,急死了,各位帮忙一下,谢谢! | show_up | Other Programming Discussion 关于其他编程技术的讨论 | 4 | 2004-08-17 09:57 |