'ModuleNotFoundError: No module named '_typeshed'

I'm a beginner programmer and we were tasked to create a class on Google Colab.

This is the code that I created:

from _typeshed import Self

class Customers:
  greeting = 'Welcome to the Coffee Palace!'
  
  def __init__(self, name, beverage, food, total):
    self.name = name
    self.beverage = beverage
    self.food = food
    self.total = total

c1 = Customers()
c2 = Customers()

c1.name = 'Samirah'
c1.beverage = 'Iced caffe latte'
c1.food = 'Cinnamon roll'
c1.total = 225

c2.name = 'Jerry'
c2.beverage = 'Caramel macchiato'
c2.food = 'Glazed doughnut'
c2.tota = 230

print('Samirah wants to drink '+ c1.beverage)
print('Jerry wants to eat '+ c2.food)

But then this error keeps popping:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-13-d30ac4e0ffe7> in <module>()
----> 1 from _typeshed import Self
      2 #CodeHere
      3 class Customers:
      4   greeting = 'Welcome to the Coffee Palace!'
      5 

ModuleNotFoundError: No module named '_typeshed'

I don't know how to fix this or if there are actually some errors in my code, so your help is greatly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source