strs = ['x=1', 'b=4', 'x=4']
I want to get:
str = 'x=1 AND b=4 AND x=4'
What is a simplest way to do that in Python?
P.S. too stupid question
Found:
' AND '.join( strs )
You answered you own question, join is the way to do this.
' '.join(strs)
Will put a space between each item in strs. And the following:
' AND '.join(strs)
Will put ' AND ' between each item.
str(not even for a quick example), there is a builtinstr