How to split a string in Python by 2 or 3, etc [duplicate]
This question already has an answer here:
What is the most "pythonic" way to iterate over a list in chunks? 16 answers
Split python string every nth character? [duplicate] 6 answers
Does anyone know if it's possible in python to split a string, not
necessarily by a space or commas, but just by every other entry in the
string? or every 3rd or 4th etc.
For example if I had "12345678" as my string, is there a way to split it
into "12", "34", "56", 78"?
No comments:
Post a Comment