Python Use Variable In Nested Tables