# タプル(tuple)

# Python

t1 = (404, 'Not Found')
t1 = (404, 'Not Found')

t1[0] // => 404
t1[1] // => "Not Found"
tuple(list1) # list to tuple

# TypeScript

const t1: [number, string] = [404, "Not Found"];
const t1: [number, string] = [404, "Not Found"];

t1[0] // => 404
t1[1] // => "Not Found"

[ 📩 ご意見 ]