0

Let's suppose I have a tuple

tup = (14, 180, 255)

I would like to return a string of this tuple, literally as it is, not just the values inside.

str_tup = magic_function(tup)
str_tup 
> '(14, 180, 255)'

How can I achieve this?

edge-case
  • 1,128
  • 2
  • 14
  • 32

1 Answers1

3

str(tup)

Read the Python docs, please.

vurmux
  • 9,420
  • 3
  • 25
  • 45