+ 1

Can we use the previously define function name for defining another function as it can be assigned with some other name?

like def fun1(): #body operation = fun1 now work of fun1 can be accomplished by operation so can I redefine the body of fun1() for other use?

30th Jun 2016, 6:47 AM
Rituraj Mehra
Rituraj Mehra - avatar
7 Respuestas
+ 5
Whatever programming language we are talknig about (not only in Python), the answer is no, you cannot.
3rd Jul 2016, 9:33 PM
Junimistu' 2105
Junimistu' 2105 - avatar
0
Yes you can.
2nd Jul 2016, 8:31 PM
Aditya Narania
Aditya Narania - avatar
0
tttdgh
5th Jul 2016, 8:54 PM
Boris Andrés Litardo Moyano
Boris Andrés Litardo Moyano - avatar
0
hj
5th Jul 2016, 8:54 PM
Boris Andrés Litardo Moyano
Boris Andrés Litardo Moyano - avatar
0
vcx
9th Jul 2016, 3:54 PM
Titas Gapsevicius
Titas Gapsevicius - avatar
0
yes you can but parametars are different
12th Jul 2016, 8:53 PM
pradeep
- 3
Yes you can. But you will have to write your current function this way : operation = fun1()
30th Jun 2016, 7:24 PM
andrews lartey
andrews lartey - avatar