Php Array Key To String Function In Python