Simple parser of a strings where would keys and values are separated by a colon(:)
Project description
A simple parser that will separate a string of would be arguments in the form of key:value
where key and value are strings separated by a colon. This should work for any number of pairs.
Example:
$ example.py key1:value1 key2:value2 key3:this is value3
Would result in a dictionary of:
d { 'key1' : 'value1'
'key2' : 'value2'
'value3 : 'this is value3'
}
where key and value are strings separated by a colon. This should work for any number of pairs.
Example:
$ example.py key1:value1 key2:value2 key3:this is value3
Would result in a dictionary of:
d { 'key1' : 'value1'
'key2' : 'value2'
'value3 : 'this is value3'
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
parseoncolon-0.05.tar.gz
(1.1 kB
view details)
File details
Details for the file parseoncolon-0.05.tar.gz
.
File metadata
- Download URL: parseoncolon-0.05.tar.gz
- Upload date:
- Size: 1.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2304cf017d25b4dbb27a3ba474621389579fd849600ef696ce43d49da7bf663 |
|
MD5 | 3aea96a03e6c17826e74ba088f52b483 |
|
BLAKE2b-256 | 0759abff362c2314b4aa8dbaee40eef5ba13e07936e3d08a105e6598fbae5b22 |