Php Iterate Over Key Value In Python