Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Comment
by
tech2
· 4y ago · 0 comments
Is empty string acceptable in place of None? If so, consider partition:
key, sep, value = item.partition("=")
If you need to know whether there was a split/match that occurred you could test sep's truthiness.
Comments
No comments yet.
Better HN