“Lista para texto Python” Respostas de código

Converta todos os itens na lista em string python

map(str, mylist)
#python 3+ map( ) doesn't output a list, which is why:
list(map(str, mylist)
#change 'str' to 'float' or 'int' for other outcomes
Hurt Hare

Lista de Python para string

By using ''.join

list1 = ['1', '2', '3']
str1 = ''.join(list1)
Stupid Shrew

Lista para texto Python

# Turn the list into a literal string:
s = ['I', 'want', 4, 'apples', 'and', 18, 'bananas'] 
# will return: "['I', 'want', 4, 'apples', 'and', 18, 'bananas']"
print(str(s))
Hurt Hare

Respostas semelhantes a “Lista para texto Python”

Perguntas semelhantes a “Lista para texto Python”

Mais respostas relacionadas para “Lista para texto Python” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código