Python Map With Conditions That Require