[Solved] Python 2.7: Accessing value from dictionary using string [closed]
[ad_1] The command str=”str1″,’str2′ creates a tuple in the variable str, and is equivalent to doing str = (‘str1’, ‘str2’) Note that this is probably the underlying cause of your confusion… you are creating a tuple but putting it in a variable with a name that indicates you expected a string. When you do str1 … Read more