Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.1K Views
|
3 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Can we select from a list by position and value?

Posted 11 years ago
POSTED BY: Paul Cleary
3 Replies
Posted 11 years ago
POSTED BY: Sandu Ursu

One can use IntegerDigits to get the digits separately:

a = Range[100000, 999999];
b = {2, 4, 5};
c = {5, 2, 1};
Select[a, IntegerDigits[#][[b]] === c &]
POSTED BY: Sander Huisman
Posted 11 years ago
POSTED BY: Paul Cleary
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard