Use the join
method of the empty string to join all of the strings together with the empty string in between, like so:
>>> a = ['a', 'b', 'c', 'd']
>>> ''.join(a)
'abcd'
More Related Contents:
- How to handle special cases in my Python code?
- How to extract the substring between two markers?
- Remove unwanted parts from strings in a column
- What is the difference between a string and a byte string?
- Good Python modules for fuzzy string comparison? [closed]
- Alphabet range in Python
- Using “and” and “or” operator with Python strings [duplicate]
- When splitting an empty string in Python, why does split() return an empty list while split(‘\n’) returns [”]?
- Joining pairs of elements of a list [duplicate]
- Splitting a string by list of indices
- Setting variables with exec inside a function
- Rotating strings in Python
- How can I convert a string to an int in Python?
- Converting a column within pandas dataframe from int to string
- Are strings cached? [duplicate]
- Python testing whether a string is one of a certain set of values [duplicate]
- Print very long string completely in pandas dataframe
- Remove duplicate chars using regex?
- How to find out if a Python object is a string?
- Print without b’ prefix for bytes in Python 3
- Limiting Python input strings to certain characters and lengths
- How to check a string for a special character?
- Python: Best Way to remove duplicate character from string
- Deleting consonants from a string in Python
- Convert string into Date type on Python [duplicate]
- How to merge two json string in Python?
- Use a string to call function in Python [duplicate]
- Why are str.count(”) and len(str) giving different outputs when used on an empty string?
- What is a “bytestring” (the `bytes` data type) in Python?
- Python- how to verify if a string ends with specific string?