Combine list items to a string

0 votes
Is there a simple way of combining list items into a string?
Jun 7, 2018 in Python by nightshade
• 870 points
27 views

1 answer to this question.

0 votes
>>> stmt = ['this','is','a','statement']
>>> ' '.join(sentence)
'this is a sentence'
answered Jun 7, 2018 by Hamartia's Mask
• 1,580 points

Related Questions In Python

0 votes
1 answer

How to split a string into a list?

You can use the function  text.split() This should be ...READ MORE

answered Jul 30, 2018 in Python by Priyaj
• 56,920 points
69 views
0 votes
1 answer

How to perform string operations on every element of a list of strings?

This can be done using list comprehension ...READ MORE

answered Jul 18 in Python by Arvind
• 2,960 points
25 views
0 votes
1 answer

Adding elements to a list in python

Use extend() instead: l = [5, 7, 12, ...READ MORE

answered Apr 23, 2018 in Python by Nietzsche's daemon
• 4,260 points
48 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 344 views
+4 votes
6 answers
0 votes
1 answer

Split a string into a list of characters

This is easy. Just use the list() ...READ MORE

answered Jun 19, 2018 in Python by Hamartia's Mask
• 1,580 points
34 views
0 votes
1 answer

Convert dictionary keys to a list

list.(dictionary.keys()) READ MORE

answered Jun 28, 2018 in Python by Hamartia's Mask
• 1,580 points
39 views