python - splitting list with equal contents -
For example, I have the following list:
content = ["I have two I have created pens, "" prices = 5 $ "," ____ and ____ "] I want to divide them in such a way that the following is the following:
array = [phrases] (for the phrase in content)] But of course, it divides them Does not it equate with content. Can someone suggest me how can I solve using this python?
You have to see which length is the longest array and then pad others like this:
array = [phrase] (speech For the phrase in the phrase)] x = max (for the i in the array i) the result = [i + [']] * (x - lane (i)) for the array i is complex but gives you the result you are looking for.
Comments
Post a Comment