0

as it confuses variables in your code with variables in the external module

in this lesson web describe as follows: * imports all objects from a module. For example: from math import * This is generally discouraged, as it confuses variables in your code with variables in the external module. #i want to ask... For example: from math import pi #but,in my code I def pi already ... so in my code is read this pi of math or my code def?

29th Jul 2020, 9:54 AM
吳宗原
吳宗原 - avatar
1 Réponse
+ 5
吳宗原 Your code pi will be read Example: from math import pi pi = "overwrite" print(pi) Output: overwrite
29th Jul 2020, 9:58 AM
Tomiwa Joseph
Tomiwa Joseph - avatar