Convert the string to list. And then list to dictionary.
str1 = "a 1 b 2 c 3" lst = str1.split(" ") dct = {lst[i]: lst[i + 1] for i in range(0, len(lst), 2)}
1.4m articles
1.4m replys
5 comments
56.9k users