4 examples of 'hello my name is peter' in Python

Every line of 'hello my name is peter' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
3def hello(self):
4 return "greetings matthew"

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

95def say_hello(name):
96 return 'Hello, {}!'.format(name)
20def hello_world(name=None):
21 """Says hello world
23 :param name: Who to say hello to
24 """
25 if name is not None:
26 return 'Hello ' + name
27 else:
28 return 'Hello world!'
8def say_hello(name):
9 """Function that will say hello to someone.
10 """
12 # Print out a hello message to the name given
13 print("Hello there {name}. It's great to see you.".format(name = name))

Related snippets