0

python module

module.py code: def add(a,b): c = a + b 2nd code: import module su = module.add(5,6) print(su) why i cant store the the summation in su ?????

18th Apr 2020, 6:24 AM
Pavan Sirsat
Pavan Sirsat - avatar
1 Resposta
+ 4
You need to return the value from the function, so that it can be stored. return a + b instead of c = a + b
18th Apr 2020, 8:06 AM
HonFu
HonFu - avatar