Answers for "how to split charaters into a list python"

9

javascript split array into chuncks of

function splitArrayIntoChunksOfLen(arr, len) {
  var chunks = [], i = 0, n = arr.length;
  while (i < n) {
    chunks.push(arr.slice(i, i += len));
  }
  return chunks;
}
var alphabet=['a','b','c','d','e','f'];
var alphabetPairs=splitArrayIntoChunksOfLen(alphabet,2); //split into chunks of two
Posted by: Guest on August-02-2019
4

python split list

string = 'this is a python string'
wordList = string.split(' ')
Posted by: Guest on March-26-2020

Code answers related to "how to split charaters into a list python"

Code answers related to "Javascript"

Browse Popular Code Answers by Language