Python Forum
How to exclude bools from integers?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to exclude bools from integers?
#1
Hi , for excluding everything, but integers i have found this code

isinstance(n,int)
. My Problem is, if i write
isinstance(n,int) == True and n!= True or False
, 0 and 1 will not remain in my code. Is there any possibility, just to remove True and False, because i want to avoid that python gives an answer for True/n or False/n.
Reply


Messages In This Thread
How to exclude bools from integers? - by boris602 - Nov-02-2019, 12:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Regex Include and Exclude patterns in Same Expression starzar 2 904 May-23-2023, 09:12 AM
Last Post: Gribouillis
  [SOLVED] [loop] Exclude ranges in… range? Winfried 2 1,652 May-14-2023, 04:29 PM
Last Post: Winfried
  Telegram Users Scrapper - Exclude UserPrivacyRestricted graphite2015 0 2,662 Oct-23-2020, 05:43 AM
Last Post: graphite2015
  loop through range until reach size and exclude specific symbol pino88 3 2,478 Sep-23-2019, 02:32 AM
Last Post: perfringo
  List Comprehension to exclude first row tkj80 5 5,085 Jun-11-2018, 09:24 AM
Last Post: volcano63
  Exclude words with specific endings from list Epileptiker 5 4,313 Apr-06-2018, 02:40 PM
Last Post: nilamo
  Twitter scraping exclude some data Robbert 6 5,365 Sep-02-2017, 09:44 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020