8

Now, this is some next level shit in python (or I just don't know about it yet).
Anyway, I only discovered this thing lately

Comments
  • 1
    What @irene said. You can do the same in PHP and JS also.
  • 0
    It can be done in many many languages and works fine. What's the problem?
  • 1
    Generally you would assign types like this for initialisation.

    Aka
    // all these are now Integers
    a = b = c = d = int

    // all these are now Boolean
    e = f = g = bool

    And so on.

    But assigning a single string to multiple variables 🤷‍♂️
  • 0
    You can also do x, y = 1, 2 😉
Add Comment