# \[?\] Delete returned True and False from a list?

**URL:** <https://community.wolfram.com/t/delete-returned-true-and-false-from-a-list/10737>\
**Category:** Questions\
**Created:** [June 24, 2017, 4:37pm UTC](https://community.wolfram.com/t/delete-returned-true-and-false-from-a-list/10737 "2017-06-24T16:37:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rashedeffat](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@rashedeffat](https://community.wolfram.com/u/rashedeffat)\
**Post date:** [June 24, 2017, 4:37pm UTC](https://community.wolfram.com/t/delete-returned-true-and-false-from-a-list/10737/1 "2017-06-24T16:37:45Z")

</div>

Hi,  
I am using a certain condition in generating a large set of lists whose elements can contain the two words ‘True’ and ‘False’ as returned by the condition. How to remove these two words from each list without the need to that manually knowing that some of teh lists may not contain these two words? I have tried DeleteCases and match to ‘True’ and ‘False’ but that didn’t work.  
This is an example of the lists I am generating:

```
{False, True, False, False, False, 
 1/128 (6 + 18 Sqrt[5] - 96 Subscript[a, 11]) == 
  0, -(1/4) Sqrt[3] Subscript[a, 12] == 0, (Sqrt[3] Subscript[a, 12])/
  8 == 0, -(1/8) Sqrt[3] Subscript[a, 13] == 0, (
  Sqrt[3] Subscript[a, 13])/8 == 0}

```

also, how to delete elements that contain numbers only with no variables or coefficients?  
Thank you,

eftrsd

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [June 24, 2017, 5:02pm UTC](https://community.wolfram.com/t/delete-returned-true-and-false-from-a-list/10737/2 "2017-06-24T17:02:41Z")

</div>

DeleteCases[{False, True, False, False, False,  
1/128 (6 + 18 Sqrt[5] - 96 Subscript[a, 11]) ==  
0, -(1/4) Sqrt[3] Subscript[a, 12] ==  
0, (Sqrt[3] Subscript[a, 12])/8 ==  
0, -(1/8) Sqrt[3] Subscript[a, 13] ==  
0, (Sqrt[3] Subscript[a, 13])/8 == 0}, True | False]

works fine

---

<div class="post-metadata">

**Author:** ![chwanguiuc98](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@chwanguiuc98](https://community.wolfram.com/u/chwanguiuc98)\
**Post date:** [June 26, 2017, 12:52pm UTC](https://community.wolfram.com/t/delete-returned-true-and-false-from-a-list/10737/3 "2017-06-26T12:52:09Z")

</div>

To delete also a numeric quantity, add to what Sander gives as follows:

```
DeleteCases[{False, True, False, False, False, 
  1/128 (6 + 18 Sqrt[5] - 96 Subscript[a, 11]) == 
   0, -(1/4) Sqrt[3] Subscript[a, 12] == 
   0, (Sqrt[3] Subscript[a, 12])/8 == 
   0, -(1/8) Sqrt[3] Subscript[a, 13] == 
   0, (Sqrt[3] Subscript[a, 13])/8 == 0, 3., 100, \[Pi]}, 
 True | False | _?NumericQ]

```

---

<div class="post-metadata">

**Author:** ![rashedeffat](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@rashedeffat](https://community.wolfram.com/u/rashedeffat)\
**Post date:** [June 26, 2017, 2:32pm UTC](https://community.wolfram.com/t/delete-returned-true-and-false-from-a-list/10737/4 "2017-06-26T14:32:03Z")

</div>

Thank you all.  
eftrsd
