Nov-21-2018, 10:42 AM
(This post was last modified: Nov-21-2018, 11:17 AM by wardancer84.)
often discussed on the interwebs, but no i idiot-proof solution available.
i want to split the following list of strings by the "=" and keep the left part incl. the "=", and the re module should NOT be used for this.
best would be to integrate this in this generator
i want to split the following list of strings by the "=" and keep the left part incl. the "=", and the re module should NOT be used for this.
>>> print(options) ['SYSTEM=LDAP', 'registry=LDAP']output should look like this -> ['SYSTEM=', 'registry=']
best would be to integrate this in this generator
def arguments_generator(options): for element in options: yield '-a' yield element