Pregunta de entrevista de Infosys

What is "Monkey Patching" in Python? write one line python code to return odd numbers and even numbers separately, given a list of numbers.

Respuesta de la entrevista

Anónimo

6 de jun de 2018

e_o_l = [3, 4, 77,9] e, o = [x for x in e_o_l if x % 2 == 0], [x for x in e_o_l if x % 2 != 0]