The split function is used over a string to separate it into smaller pieces. To do this, the function needs a string parameter with the separator that will determine how the string is split. Let's say that I have a string that contains a list of items separated by commas, like this: shop_string = "milk, soap, chocolate, cereals, bread, coffee, snacks" Now I want to recover this items and process them, but as they are in a string, I can't take each one separately and do whatever with them. I have to split the string to get each one of them. And then is when the split() functions come to save us. But after using it, we need to know which separator is more adequate to get what we need. In this case, it is obvious that we can use the commas as a separator to get each individual element, which will be returned as a list. So, we can use the function just like this: shop_list = shop_string.split(',') This will return a list in which each element is a string from the original shop_string, but removing the separator (in this case, the commas) and everything that comes after it. It's like the function searches through the string until it finds the separator, removes it and pushes to the list everything that it read until reaching the separator (as a string), and then does the same from the point it was (not from the start). So the contents of shop_list will be: ['milk', ' soap', ' chocolate', ' cereals', ' bread', ' coffee', ' snacks'] Remember that the commas now are separators for the elements of the list, they are not inside each element. You can see that each element, except the first, has also a leading space, as it was in the original string. So, if we want to get the elements without the space, we can add it to the separator and it will remove it for us, just like this: shop_list = shop_string(', ') ['milk', 'soap', 'chocolate', 'cereals', 'bread', 'coffee', 'snacks'] Be aware that if you use a separator that doesn't exist in the string, it will be return the string as a list and won't do anything: shop_list = shop_string('_') ['milk, soap, chocolate, cereals, bread, coffee, snacks'] This is it because it couldn't find the separator, so it searched in all the string, and returned what it read, that was everything. The function is really useful when you want to get certain parts of a string to use them later, as you can use multiple split to get the exact part that you need. For example, we have the following string: conf = "Configuration values: min_str_len=5; max_str_len=10; min_int_value=0; max_int_value=100 This string contains some configuration values, and we need to operate with them later, but as they're in a string, is really difficult to get the exact name and value of each configuration. So we can use split to get name and value of each configuration. First, we can remove the leading part of the string, that isn't relevant: conf_values = conf.split(': ')[1] The result of this line will be: 'min_str_len=5; max_str_len=10; min_int_value=0; max_int_value=100' Because split with the separator ': ' returns a list with two elements: the trailing statement before the colon, and the rest of the string that contains the values that we want to recover, so we select only the second part using [1]. Now we have to separate each configuration, and we can do it using the semicolon and the space as separator: conf_values = conf_values.split('; ') ['min_str_len=5', 'max_str_len=10', 'min_int_value=0', 'max_int_value=100'] Now we have a list with each configuration, but still we have to get the actual name and value of each element, so we can iterate through the list and use split again on each one, using = as the separator: for configuration in conf_values: name, value = configuration.split('=') dict.update({name:int(value)}) In the first line, we iterate over the list using a variable called configuration that will hold the value of the element on each iteration. Then, we can use split on it to get the values that we want. As we know that the use of this split will return a list with only two elements, we can use two variables and assign them directly, named name and value, holding each one the name and value of the configuration, respectively. After this, we can use them for whatever we want, but as we are in a loop, we will lose the actual content of both values after it finishes, so we can store them somewhere, for example in a dictionary using the update function. We can also store the value as an int if we want. The result of the dictionary will be: {'min_str_len':5, 'max_str_len':10, 'min_int_value':0, 'max_int_value':100} I hope that now you understand a little better how the split function works!