Skip to main content
added 81 characters in body
Source Link
Rojo
  • 42.8k
  • 7
  • 98
  • 190
l = RandomChoice[Range[-100, 1], 50];

Simplest to understand is

Or @@ Positive[l]

Perhaps faster for long lists is

Total@UnitStep[-l] =!= Length@l
l = RandomChoice[Range[-100, 1], 50];

Simplest to understand is

Or @@ Positive[l]
l = RandomChoice[Range[-100, 1], 50];

Simplest to understand is

Or @@ Positive[l]

Perhaps faster for long lists is

Total@UnitStep[-l] =!= Length@l
Source Link
Rojo
  • 42.8k
  • 7
  • 98
  • 190

l = RandomChoice[Range[-100, 1], 50];

Simplest to understand is

Or @@ Positive[l]