The difference between element group and array when using in operator in Python

From , 5 Years ago, written in Python, viewed 103 times.
URL https://pastebin.vip/view/1819020b
  1. >>> 'sharejs.com' in ['haotu.net','sharejs.com']
  2. True
  3. >>> 'sharejs.com' in ('haotu.net','sharejs.com')
  4. True
  5.  
  6. >>> 'sharejs.com' in ['sharejs.com/codes','haotu.net']
  7. False
  8. >>> 'sharejs.com' in ('sharejs.com/codes','haotu.net')
  9. False
  10.  
  11. >>> 'sharejs.com' in ['sharejs.com/codes']
  12. False
  13. >>> 'sharejs.com' in ('sharejs.com/codes')
  14. True
  15.  
  16. >>> 'sharejs.com' in ['sharejs.com/codes']
  17. False
  18. >>> 'sharejs.com' in ('sharejs.com/codes',)
  19. False
  20.  
  21.  
  22. #//python/9069

Reply to "The difference between element group and array when using in operator in Python"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website