# Dotted pair operator .=\>

**URL:** https://discourse.julialang.org/t/dotted-pair-operator/50978
**Category:** General Usage
**Created:** [November 30, 2020, 7:44am UTC](https://discourse.julialang.org/t/dotted-pair-operator/50978 "2020-11-30T07:44:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)
#### Post date: [November 30, 2020, 7:44am UTC](https://discourse.julialang.org/t/dotted-pair-operator/50978/1 "2020-11-30T07:44:49Z")

</div>

I just realized today that it is possible to create a dict with `.=>`:

```julia
julia> Dict(['a', 'b', 'c'] .=> 1:3)
Dict{Char,Int64} with 3 entries:
  'a' => 1
  'c' => 3
  'b' => 2

```

Dotted syntax for pairs: this made my day!

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [November 30, 2020, 8:32am UTC](https://discourse.julialang.org/t/dotted-pair-operator/50978/2 "2020-11-30T08:32:35Z")

</div>

You can also make ranges with `Char`s, so 😉

```julia
julia> Dict('a':'z' .=> 1:26)
Dict{Char,Int64} with 26 entries:
  'n' => 14
  'f' => 6
  'w' => 23
  'd' => 4
  'e' => 5
  'o' => 15
  'h' => 8
  'j' => 10
  'i' => 9
  'k' => 11
  'r' => 18
  's' => 19
  't' => 20
  'q' => 17
  'y' => 25
  'a' => 1
  'c' => 3
  'p' => 16
  'm' => 13
  ⋮ => ⋮

```
