Is there a rule when naming variables/functions in Python?

Asked 2 years ago, Updated 2 years ago, 121 views

In C#, when naming variables/functions, there were implicit rules such as CamelCase and PascalCase I wonder if Python also has this rule.

string thisIsMyVariable = "a" public void ThisIsMyMethod()

this_is_my_variable = 'a' def this_is_my_function():

function python varaiables naming-convention

2022-09-21 23:21

1 Answers

To summarize PEP 8 simply

(Assume global variables are used only within one module)


2022-09-21 23:21

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.