lists join is the inverse of split it takes list of strings and concatenates the elements join is string methodso you have to invoke it on the delimiter and pass the list as parametert ['pining''for''the''fjords'delimiter delimiter join( 'pining for the fjordsin this case the delimiter is space characterso join puts space between words to concatenate strings without spacesyou can use the empty string""as delimiter parsing lines usually when we are reading file we want to do something to the lines other than just printing the whole line often we want to find the "interesting linesand then parse the line to find some interesting part of the line what if we wanted to print out the day of the week from those lines that start with "from"from stephen marquard@uct ac za sat jan : : the split method is very effective when faced with this kind of problem we can write small program that looks for lines where the line starts with "from"split those linesand then print out the third word in the linefhand open('mbox-short txt'for line in fhandline line rstrip(if not line startswith('from ')continue words line split(print(words[ ]codethe program produces the following outputsat fri fri fri laterwe will learn increasingly sophisticated techniques for picking the lines to work on and how we pull those lines apart to find the exact bit of information we are looking for