“string para listar python” Respostas de código

converter string para listar python

# To split the string at every character use the list() function
word = 'abc'
L = list(word)
L
# Output:
# ['a', 'b', 'c']

# To split the string at a specific character use the split() function
word = 'a,b,c'
L = word.split(',')
L
# Output:
# ['a', 'b', 'c']
SkelliBoi

string para listar python

# Python code to convert string to list
  
def Convert(string):
    li = list(string.split(" "))
    return li
  
# Driver code    
str1 = "Geeks for Geeks"
print(Convert(str1))
AVIGNAN NAG

Respostas semelhantes a “string para listar python”

Perguntas semelhantes a “string para listar python”

Mais respostas relacionadas para “string para listar python” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código