Skip to main content
added 77 characters in body
Source Link
Halvard Hummel
  • 3.2k
  • 1
  • 11
  • 25

Python 3, 61 5656 54 bytes

Saved 57 bytes thanks to @Mr.Xcoder and, @pizzapants184 and @ovs

lambda a,b:max(f for f in a if f*(a.count(f)==b.count(f)<2)for f in a)

Try it online!Try it online!

Python 3, 61 56 bytes

Saved 5 bytes thanks to @Mr.Xcoder and @pizzapants184

lambda a,b:max(f for f in a if a.count(f)==b.count(f)<2)

Try it online!

Python 3, 61 56 54 bytes

Saved 7 bytes thanks to @Mr.Xcoder, @pizzapants184 and @ovs

lambda a,b:max(f*(a.count(f)==b.count(f)<2)for f in a)

Try it online!

added 185 characters in body
Source Link
Halvard Hummel
  • 3.2k
  • 1
  • 11
  • 25

Python 3, 6161 56 bytes

Saved 5 bytes thanks to @Mr.Xcoder and @pizzapants184

lambda xa,yb:max(lf for lf in{*x}&{*y} a if xa.count(lf)+y==b.count(lf)<3<2)

Try it online!Try it online!

Python 3, 61 bytes

lambda x,y:max(l for l in{*x}&{*y}if x.count(l)+y.count(l)<3)

Try it online!

Python 3, 61 56 bytes

Saved 5 bytes thanks to @Mr.Xcoder and @pizzapants184

lambda a,b:max(f for f in a if a.count(f)==b.count(f)<2)

Try it online!

added 151 characters in body
Source Link
Halvard Hummel
  • 3.2k
  • 1
  • 11
  • 25

Python 3, 61 bytes

lambda x,y:max(l for l in{*x}&{*y}if x.count(l)+y.count(l)<3)

Try it online!Try it online!

Python 3, 61 bytes

lambda x,y:max(l for l in{*x}&{*y}if x.count(l)+y.count(l)<3)

Try it online!

Python 3, 61 bytes

lambda x,y:max(l for l in{*x}&{*y}if x.count(l)+y.count(l)<3)

Try it online!

Source Link
Halvard Hummel
  • 3.2k
  • 1
  • 11
  • 25
Loading