搜索没有循环的python字典值列表

时间:2015-07-14 20:08:34

标签: list python-2.7 search dictionary

我有一个庞大的字典(7000万个键),其结构如下:

    // Code to execute when the application is activated (brought to foreground)
    // This code will not execute when the application is first launched
    private void Application_Activated(object sender, ActivatedEventArgs e)
    {
         // your code
    }

如果我找到mydict[key] = [val1, val2, val3] 的肯定匹配,我需要将val1放在一个单独的变量中,并且我尝试在没有for循环的情况下执行此操作以节省时间。基本上,我想这样做:

val2

但我想避免使用for循环。

0 个答案:

没有答案