---
title: Inlägg | SDNit
description: Python can be weird. Let’s explore some strange examples. Example 1 - 8 bit issue? >>> a = 256 >>> b = 256 >>> a is b True >>> a = 257 >>> b = 257 >>> a is
---

![](https://blogg.sdnit.se/hs-fs/hubfs/purplebackground-square.jpg?width=1200&height=1200&name=purplebackground-square.jpg)

- [Om oss](https://www.sdnit.se/om-oss)
- [Våra tjänster](https://www.sdnit.se/v%C3%A5ra-tj%C3%A4nster)
- [Jobba med oss](https://www.sdnit.se/jobba-hos-oss)
- [Artiklar](https://www.sdnit.se/blog)
- [Kontakta oss](https://www.sdnit.se/kontakta-oss)

<https://blogg.sdnit.se/blogg-2/post/wtf-python#atbs-offcanvas-primary> <https://blogg.sdnit.se/blogg-2/post/wtf-python#atbs-offcanvas-mobile>

![](https://blogg.sdnit.se/hs-fs/hubfs/purplebackground-square.jpg?width=1200&height=1200&name=purplebackground-square.jpg)

<https://blogg.sdnit.se/blogg-2/post/wtf-python#atbs-offcanvas-mobile>

- Menu Item 1 
    - Sub-menu Item 1 
          - Another Item
    - Sub-menu Item 2
- Menu Item 2 
    - Yet Another Item
- Menu Item 3
- Menu Item 4

[✕](https://blogg.sdnit.se/blogg-2/post/wtf-python#atbs-offcanvas-primary)

#### Title

 text name

 text name

 text name

 text name

#### Title

 text name

 text name

 text name

 text name

search

- Det finns inga förslag eftersom sökfältet är tomt.

[✕](https://blogg.sdnit.se/blogg-2/post/wtf-python#atbs-offcanvas-mobile)

![](https://blogg.sdnit.se/hs-fs/hubfs/purplebackground-square.jpg?width=1200&height=1200&name=purplebackground-square.jpg)

- Menu Item 1 
    - Sub-menu Item 1 
          - Another Item
    - Sub-menu Item 2
- Menu Item 2 
    - Yet Another Item
- Menu Item 3
- Menu Item 4

#### EXPLORE MORE

[Follow us on Facebook](https://www.facebook.com) [Follow us on LinkedIn](https://www.linkedin.com) [Follow us on Twitter](https://www.twitter.com)

![](https://blogg.sdnit.se/hs-fs/hubfs/purplebackground-square.jpg?width=1200&height=1200&name=purplebackground-square.jpg)

- [Om oss](https://www.sdnit.se/om-oss)
- [Våra tjänster](https://www.sdnit.se/v%C3%A5ra-tj%C3%A4nster)
- [Jobba med oss](https://www.sdnit.se/jobba-hos-oss)
- [Artiklar](https://www.sdnit.se/blog)
- [Kontakta oss](https://www.sdnit.se/kontakta-oss)

<https://blogg.sdnit.se/blogg-2/post/wtf-python#atbs-offcanvas-primary> <https://blogg.sdnit.se/blogg-2/post/wtf-python#atbs-offcanvas-mobile>

# Inlägg

[SDNit](https://blogg.sdnit.se/blogg-2/author/sdnit) 

3 nov 2021 [0 Comments](https://blogg.sdnit.se/blogg-2/post/wtf-python#comments)

- <http://www.facebook.com/share.php?u=https://blogg.sdnit.se/blogg-2/post/wtf-python>
- <https://twitter.com/intent/tweet?text=I+found+this+interesting+blog+post&url=https://blogg.sdnit.se/blogg-2/post/wtf-python>
- <http://www.linkedin.com/shareArticle?mini=true&url=https://blogg.sdnit.se/blogg-2/post/wtf-python>

Python can be weird. Let’s explore some strange examples.

![](https://blogg.sdnit.se/hubfs/Imported_Blog_Media/f98cdb_f7515d0944114d68b3c4691febdc306a~mv2-2.png)

Example 1 - 8 bit issue?

```
>>> a = 256 >>> b = 256 >>> a is b True >>> a = 257 >>> b = 257 >>> a is b False
```

Example 2 - Where did Ruby go?

```
>>> programming = dict() >>> programming[5.5] = "JavaScript" >>> programming[5.0] = "Ruby" >>> programming[5] = "Python" >>> programming[5.5] 'JavaScript' >>> programming[5] 'Python' >>> programming[5.0] 'Python'
```

Example 3 - not valid?

```
>>> x = True >>> y = False >>> not x == y True >>> y == not x File "<stdin>", line 1 y == not x ^ SyntaxError: invalid syntax
```

Example 4 - huh!?

```
>>> a = "wtf" >>> b = "wtf" >>> a is b True >>> a = "wtf!" >>> b = "wtf!" >>> a is b False
```

[0](https://blogg.sdnit.se/blogg-2/post/wtf-python#comments)

Next Article

### [Konsultföretaget SDNit förenklar leveransen av Multi Tenant-lösningar med Cisco DNA Center](https://blogg.sdnit.se/blogg-2/post/konsultföretaget-sdnit-förenklar-leveransen-av-multi-tenant-lösningar-med-cisco-dna-center)

<https://blogg.sdnit.se/blogg-2/post/konsultföretaget-sdnit-förenklar-leveransen-av-multi-tenant-lösningar-med-cisco-dna-center>

RELATED ARTICLE

### May Be You Like

<https://blogg.sdnit.se/blogg-2/en/post/wtf-python> [Python](https://blogg.sdnit.se/blogg-2/tag/python)

### [Wtf Python](https://blogg.sdnit.se/blogg-2/en/post/wtf-python)

november 3 2021 [SDNit](https://blogg.sdnit.se/blogg-2/author/sdnit)

<https://blogg.sdnit.se/blogg-2/post/you-have-your-sales-forecast-now-what> [Python](https://blogg.sdnit.se/blogg-2/tag/python)

### [Wtf Python](https://blogg.sdnit.se/blogg-2/post/you-have-your-sales-forecast-now-what)

november 3 2021 [SDNit](https://blogg.sdnit.se/blogg-2/author/sdnit)

<https://blogg.sdnit.se/blogg-2/post/friends-don-t-let-friends-use-shared-ssh-keys>

### [Inlägg](https://blogg.sdnit.se/blogg-2/post/friends-don-t-let-friends-use-shared-ssh-keys)

november 2 2021 [SDNit](https://blogg.sdnit.se/blogg-2/author/sdnit)

<https://blogg.sdnit.se/blogg-2/en/post/securing-your-build-pipeline-of-docker-images> [DevOps](https://blogg.sdnit.se/blogg-2/tag/devops)

### [Securing Your Build Pipeline of Docker Images](https://blogg.sdnit.se/blogg-2/en/post/securing-your-build-pipeline-of-docker-images)

oktober 17 2023 [SDNit](https://blogg.sdnit.se/blogg-2/author/sdnit)

### Heading Title

 There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form

1

### [4 tips för att stärka er cybersäkerhet](https://blogg.sdnit.se/blogg-2/post/4-tips-för-att-stärka-er-cybersäkerhet)

[Read More](https://blogg.sdnit.se/blogg-2/post/4-tips-för-att-stärka-er-cybersäkerhet)

2

### [Inlägg](https://blogg.sdnit.se/blogg-2/post/4-tips-for-strengthening-your-cybersecurity)

[Read More](https://blogg.sdnit.se/blogg-2/post/4-tips-for-strengthening-your-cybersecurity)

3

### [4 tips for strengthening your cybersecurity](https://blogg.sdnit.se/blogg-2/en/post/4-tips-for-strengthening-your-cybersecurity)

[Read More](https://blogg.sdnit.se/blogg-2/en/post/4-tips-for-strengthening-your-cybersecurity)

Lorem ipsum dolor sit amet, cons aring elit sed dllao the eimod tempor inciunt ullaco laboris aliquip alora tolfy alora tolda foucos dondy athlle shalom.

#### HEAD OFFICE

- text name
- text name
- text name
- text name

#### HEAD OFFICE

- Menu Item 1 
    - Sub-menu Item 1 
          - Another Item
    - Sub-menu Item 2
- Menu Item 2 
    - Yet Another Item
- Menu Item 3
- Menu Item 4

##### Newsletter

Lorem ipsum dolor sit amet, cons aring elit sed

[Follow us on Facebook](https://www.facebook.com) [Follow us on LinkedIn](https://www.linkedin.com) [Follow us on Twitter](https://www.twitter.com) [Follow us on Instagram](https://www.instagram.com)

All Rights Are Reserved

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "SDNit",
    "url" : "https://blogg.sdnit.se/blogg-2/author/sdnit"
  },
  "dateModified" : "2024-02-20T12:17:11.958Z",
  "datePublished" : "2021-11-02T23:00:00.000Z",
  "headline" : "Inlägg | SDNit",
  "mainEntityOfPage" : {
    "@id" : "https://blogg.sdnit.se/blogg-2/post/wtf-python",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blogg.sdnit.se/hubfs/purplebackground-square.jpg"
    }
  }
}
```