From this link: How do I pass a variable by reference?, we know, Python will copy a string (an immutable type variable) when it is passed to a function as a parameter, but I
def modify_string( t ): the_string = t[0] # do stuff modify_string( ["my very long string"] )