Answers for "print list as plain text python"

4

python print list as string

list1 = ['1', '2', '3']
str1 = ''.join(list1)
Posted by: Guest on May-11-2020
0

list to text 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))
Posted by: Guest on November-24-2021

Python Answers by Framework

Browse Popular Code Answers by Language