# Declare tuple type of arbitrary length

**URL:** <https://discourse.julialang.org/t/declare-tuple-type-of-arbitrary-length/115199>\
**Category:** New to Julia\
**Tags:** tuple, dictionary\
**Created:** [June 4, 2024, 9:41pm UTC](https://discourse.julialang.org/t/declare-tuple-type-of-arbitrary-length/115199 "2024-06-04T21:41:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsuwal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bsuwal/32/19577_2.png) [@bsuwal](https://discourse.julialang.org/u/bsuwal)\
**Post date:** [June 4, 2024, 9:41pm UTC](https://discourse.julialang.org/t/declare-tuple-type-of-arbitrary-length/115199/1 "2024-06-04T21:41:45Z")

</div>

Is there any way I can declare a type for my dictionary with a tuple of the same element type but of arbitrary length?

For example I can currently do this:

```julia
d = Dict{Tuple{Int, Int}, String}()
d[(1, 2)] = "a"

```

and get a dictionary that supports keys that are tuples of length 2. But I would like to parameterize the length of this tuple - for example I would like to do something like

```julia
d = Dict{Tuple{Int, N}, String}()
x = (1, 2, ..., N) # the length of this tuple is N
d[x] = "a"

```

How could I do this? I have scoured the documentation but could not figure it out. Thanks in advance!

EDIT:: NTuple{N, T} is what I was looking for. Never mind!!
