Posts Tagged ‘join’

Imagine you have two text files, one with a list of names and another with a list of birth dates, which each name corresponding to the date of birth on the same line number in the other file, like so: names.txt Anthony Kiedis Flea Chad Smith John Frusciante dob.txt 1-Nov-1962 16-Oct-1962 25-Oct-1961 5-Mar-1970 You would […]

Strings in python can be split using any given delimeter. Unlike other languages, the delimeter can be a string of any length; it’s not limited to one character. To do this, you can use the <string>.split(<delimeter>) function. Similarly, you can join an array of strings back into one string, using any defined string to join […]