python 实现case when ,switch的功能


Python可以通过数据字典的方式实现


#!/usr/bin/env  python  
#coding=utf-8

list = {"id":"1","iname":"dwchaoyue","iaddr":"ShangHai","iage":"null"}

print list.get("id")