Answers for "turn an element of a list into a strng"

2

convert all items in list to string python

mylist = [str(i) for i in mylist]
Posted by: Guest on January-18-2021
0

turn list into string

import random
word_list = ["aardvark", "baboon", "camel"]
chosen_word = random.choice(word_list)
word_length = len(chosen_word)

#Create blanks
display = []
for _ in range(word_length):
    display += "_"
    
print(f"{' '.join(display)}")
Posted by: Guest on October-29-2021

Code answers related to "turn an element of a list into a strng"

Python Answers by Framework

Browse Popular Code Answers by Language