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?

0

1 Answer 1

3

str(tup)

Read the Python docs, please.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.