I need to add a space on each 3 characters of a python string but don\'t have many clues on how to do it.
The string:
345674655
The ou
a one-line solution will be
" ".join(splitAt(x,3))
however, Python is missing a splitAt() function, so define yourself one
splitAt()
def splitAt(w,n): for i in range(0,len(w),n): yield w[i:i+n]