a = [ 'abc=lalalla', 'appa=kdkdkdkd', 'kkakaka=oeoeoeo']
d = dict(s.split('=') for s in a)
print d
Output:
{'kkakaka': 'oeoeoeo', 'abc': 'lalalla', 'appa': 'kdkdkdkd'}
More Related Contents:
- Python casting error: Invalid literal for int() with base 10
- Why doesn’t calling a string method do anything unless its output is assigned?
- Reverse a string in Python
- How do I get the filename without the extension from a path in Python?
- Speed up millions of regex replacements in Python 3
- How to test if a string contains one of the substrings in a list, in pandas?
- TypeError: ‘str’ does not support the buffer interface
- How do I remove a substring from the end of a string?
- removing emojis from a string in Python
- Find column whose name contains a specific string
- How to check a string for specific characters?
- Proper indentation for multiline strings?
- How do I convert all strings in a list of lists to integers?
- TypeError: cannot concatenate ‘str’ and ‘int’ objects [duplicate]
- write() versus writelines() and concatenated strings
- NLTK-based text processing with pandas
- Python 3.1.1 string to hex
- Python: Using vars() to assign a string to a variable
- Why can’t I end a raw string with a backslash? [duplicate]
- Why empty string is on every string? [duplicate]
- String exact match
- How to strip a specific word from a string?
- How to detect lowercase letters in Python?
- Python- how do I use re to match a whole string [duplicate]
- Is there a native templating system for plain text files in Python?
- How to apply __str__ function when printing a list of objects in Python [duplicate]
- Plural String Formatting
- Setting the fmt option in numpy.savetxt
- Adding backslashes without escaping [duplicate]
- Modifying a list while iterating when programming with python [duplicate]