Message from Python discussions
— Is there anything like
%w[one two three] (Ruby) in Python to easily create a list of strings?
Hey guys! Please, suggest a likes app for django. It should implement a number of different kind of likes. Any options out there?
— Strs = ["" for x in range(size)]
— Thank you for reply. Unfortunately these apps implements only one type of vote/like.
— I guess the option at the moment to create one
— Well, you can adapt or create one
— This is not even close to what i wanted but thx :D
— IDK Ruby 😞
— No problem^^
Let me explain.
%w[one two three] == ['one', 'two', 'three']
I want the same syntactic sugar for python, to get rid of all these '' when I have to hardcode a huge list of strings. But I guess there isn't sth like this.
— Your code just gives me a list of empty strings which isn't very pythonic
— Oh, I see