Created
March 24, 2011 09:45
-
-
Save jorgebastida/884808 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> a = "Ciudad south=Enolmu east=Dixu west=Dodala north=Trololo" | |
>>> dict([direction.split('=') for direction in a.split()[1:]]) | |
{'west': 'Dodala', 'east': 'Dixu', 'north': 'Trololo', 'south': 'Enolmu'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment