Given a string \"VAR=value\" I want to split it (only) at the first \'=\' sign (< value > may contain more \'=\' signs), something like this:
<
Really strange question, because you can do just:
var, _, value = s.partition(sep)
and don't care about _ variable, but _ is just a name as sep, as var or value. By the way use str.split
_
sep
var
value
str.split
>>> var, value = "VAR=value".split('=') >>> var, value ('VAR', 'value') >>>