eval.in

Paste #153

Python — CPython 3.2.3, pasted 4 years ago

1
2
3
4
5
6
7
8
9
class Greeter:
  def __init__(self, name):
    self.name = name

  def greet(self):
    print("Hello %s!" % self.name)

greeter = Greeter("Charlie")
greeter.greet()

Program Output

Hello Charlie!

OK (0.056 sec real, 0.298 sec wall, 7 MB, 26 syscalls)

Fork