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"
Important

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

94@template.simple_tag
95def say_hello(name):
96 return 'Hello, {}!'.format(name)
19@with_uppercase
20def hello_world(name=None):
21 """Says hello world
22
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 """
11
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