varaiables tag

2 questions


1 answers
126 views
0
Question about the range of Python variables

a=0def vartest(a): a=1 return aprint(vartest(a))Why is it said that a is not defined when a=0 is cleared? Since a in the function and a outside of the function are different variables, we defined a=1 ...

2 years ago

1 answers
113 views
0
Is there a rule when naming variables/functions in Python?

In C#, when naming variables/functions, there were implicit rules such as CamelCase and PascalCaseI wonder if Python also has this rule.string thisIsMyVariable = apublic void ThisIsMyMethod()this_is_m...


© 2024 OneMinuteCode. All rights reserved.