Recent Changes - Search:

Oktatás

* Programozás 1
  + feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

Teaching

Programming 1 (BI)
  ▸ exercises
  ▸ quick link

teaching assets


Félévek

* 2025/26/2
* archívum


Linkek

* kalendárium
* tételsorok
* jegyzetek
* szakdolgozat / PhD
* ösztöndíjak
* certificates
* C lang.
* C#
* D lang.
* Java
* Nim
* Nim2
  + exercises
* XC=BASIC
* old
  ✦C++, ✦Clojure, ✦Scala


[ edit | logout ]
[ sandbox | passwd ]

Tuple unpacking

(1) tuple unpacking
def movie_info():
    return ("Total Recall", 1990)

def main():
    title, year = movie_info()

    print(title)  # Total Recall
    print(year)  # 1990
import std.stdio;
import std.typecons;

auto movie_info() {
    return tuple("Total Recall", 1990);
}

void main()
{
    auto t = movie_info();
    string title = t[0];
    int year = t[1];

    writeln(title); // Total Recall
    writeln(year); // 1990
}

Unfortunately, tuple unpacking is not (yet) supported here. So you need to do it manually.

However, there are other cases when it works.

Cloud City

  

Blogjaim, hobbi projektjeim

* The Ubuntu Incident
* Python Adventures
* @GitHub
* heroku
* extra
* haladó Python
* YouTube listák


Debrecen | la France


[ edit ]

Edit - History - Print *** Report - Recent Changes - Search
Page last modified on 2025 July 08, 15:05