# Python question: video7-9

**URL:** <https://forum.codewithmosh.com/t/python-question-video7-9/2330>\
**Category:** Python\
**Created:** [January 29, 2021, 4:18am UTC](https://forum.codewithmosh.com/t/python-question-video7-9/2330 "2021-01-29T04:18:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brandnew](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Brandnew](https://forum.codewithmosh.com/u/Brandnew)\
**Post date:** [January 29, 2021, 4:18am UTC](https://forum.codewithmosh.com/t/python-question-video7-9/2330/1 "2021-01-29T04:18:04Z")

</div>

I just copied the video, but I got different result.  
My result is {‘python’: (((0, 1), 1), 1)} instead of {“python”: 3}

Another question: Why “get” in line 5 and “TagCloud” in line 6 don’t change color in my computer?

Thank you!

1. class TagCloud:

2. def **init** (self):

3. 

```
   self.tags = {}

```

4. def add(self, tag):

5. 

```
    self.tags[tag] = self.tags.get(tag, 0), + 1

```

6. cloud = TagCloud()

7. cloud.add(“python”)

8. cloud.add(“python”)

9. cloud.add(“python”)

10. print(cloud.tags)

---

<div class="post-metadata">

**Author:** ![NicolasATC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/nicolasatc/32/714_2.png) [@NicolasATC](https://forum.codewithmosh.com/u/NicolasATC)\
**Post date:** [February 1, 2021, 3:40pm UTC](https://forum.codewithmosh.com/t/python-question-video7-9/2330/2 "2021-02-01T15:40:52Z")

</div>

I don’t have access to the videos, but if you want, post a screenshot of the video where you are having the problem. That way I can help you.
