Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14185

how to exclude `x` from `range(n)` using numpy

$
0
0

I want to create an array of numbers from 1 to n without the number x,

is there a "prettier" way to do it instead of [i for i in range(n) if i != x]?thanks!


Viewing all articles
Browse latest Browse all 14185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>