Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

variables

Are Python variables pointers? Or else, what are they?

August 21, 2022 by Magenaut

Variables in Python are just pointers, as far as I know.

Categories Python, Q&A Tags identifier, pointers, python, variables Leave a comment

What is the naming convention in Python for variable and function names?

August 21, 2022 by Magenaut

Coming from a C# background the naming convention for variables and method names are usually either camelCase or PascalCase:

Categories Python, Q&A Tags function, naming-conventions, python, variables Leave a comment

How can you print a variable name in python?

August 21, 2022 by Magenaut

Say I have a variable named choice it is equal to 2. How would I access the name of the variable? Something equivalent to In [53]: namestr(choice) Out[53]: 'choice' for use in making a dictionary. There’s a good way to do this and I’m just missing it. EDIT: The reason to do this is thus. … Read more

Categories Python, Q&A Tags dictionary, introspection, python, variables Leave a comment

How to get the original variable name of variable passed to a function

August 20, 2022 by Magenaut

Is it possible to get the original variable name of a variable passed to a function? E.g.

Categories Python, Q&A Tags function, python, variables Leave a comment

What’s the scope of a variable initialized in an if statement?

August 20, 2022 by Magenaut

I’m new to Python, so this is probably a simple scoping question. The following code in a Python file (module) is confusing me slightly:

Categories Python, Q&A Tags if-statement, local-variables, python, scope, variables Leave a comment

Importing variables from another file?

August 19, 2022 by Magenaut

How can I import variables from one file to another?

Categories Python, Q&A Tags file, import, python, variables Leave a comment

Python list doesn’t reflect variable change

August 19, 2022 by Magenaut

When I write this code:

Categories Python, Q&A Tags list, python, variables Leave a comment

Calling variable defined inside one function from another function

August 19, 2022 by Magenaut

if I have this:

Categories Python, Q&A Tags function, python, variables Leave a comment

How would I access variables from one class to another?

August 19, 2022 by Magenaut

I am writing a program that is utilizing multiple classes. I have one class that is dedicated to determining values for a set of variables. I would then like to be able to access the values of those variables with other classes. My code looks as follows:

Categories Python, Q&A Tags class, python, variables Leave a comment

python class instance variables and class variables

August 19, 2022 by Magenaut

I’m having a problem understanding how class / instance variables work in Python. I don’t understand why when I try this code the list variable seems to be a class variable

Categories Python, Q&A Tags class, instance, python, variables Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Page4 … Page8 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress