Skip to content

Magenaut

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

syntax

What is the difference between ‘/’ and ‘//’ when used for division?

August 22, 2022 by Magenaut

Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:

Categories Python, Q&A Tags floor-division, math, operators, python, syntax Leave a comment

How can I do a line break (line continuation) in Python?

August 22, 2022 by Magenaut

Given:

Categories Python, Q&A Tags line-breaks, long-lines, python, syntax Leave a comment

What does ** (double star/asterisk) and * (star/asterisk) do for parameters?

August 22, 2022 by Magenaut

What do *args and **kwargs mean?

Categories Python, Q&A Tags argument-unpacking, parameter-passing, python, syntax, variadic-functions Leave a comment

What’s the u prefix in a Python string?

August 22, 2022 by Magenaut

Like in:

Categories Python, Q&A Tags python, syntax Leave a comment

Is there a standardized method to swap two variables in Python?

August 21, 2022 by Magenaut

In Python, I’ve seen two variable values swapped using this syntax:

Categories Python, Q&A Tags conventions, python, swap, syntax Leave a comment

What is the syntax rule for having trailing commas in tuple definitions?

August 21, 2022 by Magenaut

In the case of a single element tuple, the trailing comma is required.

Categories Python, Q&A Tags python, syntax, tuples Leave a comment

What is the result of % in Python?

August 21, 2022 by Magenaut

What does the % in a calculation? I can’t seem to work out what it does.

Categories Python, Q&A Tags modulo, operators, python, python-2.7, syntax Leave a comment

What does the “at” (@) symbol do in Python?

August 21, 2022 by Magenaut

What does the @ symbol do in Python?

Categories Python, Q&A Tags python, python-decorators, syntax Leave a comment

Why does adding a trailing comma after a variable name make it a tuple?

August 21, 2022 by Magenaut

I want to know that why adding a trailing comma after a variable name (in this case a string) makes it a tuple. i.e.

Categories Python, Q&A Tags python, syntax, tuples Leave a comment

Why does (1 in [1,0] == True) evaluate to False?

August 20, 2022 by Magenaut

When I was looking at answers to this question, I found I didn’t understand my own answer.

Categories Python, Q&A Tags operator-precedence, python, syntax Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 … Page6 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