Skip to content

Magenaut

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

function

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 I return two values from a function in Python?

August 21, 2022 by Magenaut

I would like to return two values from a function in two separate variables.
For example:

Categories Python, Q&A Tags function, list, python, return, return-value Leave a comment

Passing a dictionary to a function as keyword parameters

August 21, 2022 by Magenaut

I’d like to call a function in python using a dictionary.

Categories Python, Q&A Tags dictionary, function, keyword, parameters, python Leave a comment

Apply function to each element of a list

August 20, 2022 by Magenaut

How do I apply a function to the list of variable inputs?
For e.g. the filter function returns true values but not the actual output of the function.

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

Determine function name from within that function (without using traceback)

August 20, 2022 by Magenaut

In Python, without using the traceback module, is there a way to determine a function’s name from within that function?

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

What is the difference between a function, an unbound method and a bound method?

August 20, 2022 by Magenaut

I’m asking this question because of a discussion on the comment thread of this answer. I’m 90% of the way to getting my head round it.

Categories Python, Q&A Tags function, methods, oop, python 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

python max function using ‘key’ and lambda expression

August 20, 2022 by Magenaut

I come from OOP background and trying to learn python.
I am using the max function which uses a lambda expression to return the instance of type Player having maximum totalScore among the list players.

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

Call Python function from JavaScript code

August 20, 2022 by Magenaut

I’d like to call a Python function from JavaScript code, because there isn’t an alternative in JavaScript for doing what I want. Is this possible? Could you adjust the below snippet to work?

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

Run function from the command line

August 20, 2022 by Magenaut

I have this code:

Categories Python, Q&A Tags command-line, function, python Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 … Page11 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