News

def tab_to_space (line, tab_lenght = 8): """this function change all the tabs ('\t') for spaces in a string, the lenght of the tabs is 8 by default""" while '\t' in ...
Replace function, this can be implemented in several ways: First implementation: string.replace(pos , len, new_string) pos = starting position of the sub-string to be replaced. len = length of the ...
Similarly, the Python "string" type functions as a collection type to an extent, allowing index referencing and manipulation. ... the programmer can use indices to replace the contents of a string.