Hi,
I've a function that return 3 values. (A,b,c).
Actually, I'm using global variables to save them and acces them back in the main script.
How can I return these variables without need of global var?
Thx for your help
How to return multiple value from function ?
-
- Beginner
- Posts: 18
- Joined: Sat Sep 20, 2014 1:47 am
Re: How to return multiple value from function ?
Python? Use tuples or lists... Global variables are generally not a good coding practice.
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.