Case insensitive dictionary

后端 未结 10 2443
栀梦
栀梦 2020-11-27 14:47

I\'d like my dictionary to be case insensitive.

I have this example code:

text = \"practice changing the color\"

words = {\'color\': \'colour\',
            


        
10条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-27 15:23

    Just for the record. I found an awesome impementation on Requests:

    https://github.com/kennethreitz/requests/blob/v1.2.3/requests/structures.py#L37

提交回复
热议问题