# Printf string representation as a list element

**URL:** <https://racket.discourse.group/t/printf-string-representation-as-a-list-element/2801>\
**Category:** Questions & Answers\
**Created:** [March 17, 2024, 6:09pm UTC](https://racket.discourse.group/t/printf-string-representation-as-a-list-element/2801 "2024-03-17T18:09:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyrn](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/tyrn/32/1731_2.png) [@Tyrn](https://racket.discourse.group/u/Tyrn)\
**Post date:** [March 17, 2024, 6:09pm UTC](https://racket.discourse.group/t/printf-string-representation-as-a-list-element/2801/1 "2024-03-17T18:09:03Z")

</div>

Hi,

I can see this in REPL:

```scheme
"in-test.rkt"> (define lst (list "alfa" 42))
"in-test.rkt"> lst
'("alfa" 42)
"in-test.rkt"> (printf "~a\n" lst)
(alfa 42)

```

I should much prefer it being quoted in the last line. Is there a way?

---

<div class="post-metadata">

**Author:** ![bakgatviooldoos](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/bakgatviooldoos/32/1381_2.png) [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Post date:** [March 17, 2024, 6:16pm UTC](https://racket.discourse.group/t/printf-string-representation-as-a-list-element/2801/2 "2024-03-17T18:16:11Z")

</div>

Hi, @Tyrn.

I think what you may be looking for is `~v`:

```scheme
> (printf "~v\n" lst)
'("alpha" 42)

```

See in particular the section on `fprintf`, [here](https://docs.racket-lang.org/reference/Writing.html#(part._.Writing)). I am myself not overly familiar with all of the `~*` variants.
