Skip to content

Instantly share code, notes, and snippets.

@alwye
Last active June 23, 2018 16:25
Show Gist options
  • Save alwye/786bc9c0a96033d654bd20d2e8d35ada to your computer and use it in GitHub Desktop.
Save alwye/786bc9c0a96033d654bd20d2e8d35ada to your computer and use it in GitHub Desktop.
Simple script that illustrates Python's lists, functions and loops. Created for Cisco Software Engineering School.
def get_name(first_name, last_name):
print(first_name + " " + last_name)
friends = [
{
'first_name': 'Sherlock',
'last_name': 'Holmes'
},
{
'first_name': 'Doctor',
'last_name': 'Watson'
}
]
for friend in friends:
get_name(friend['first_name'],
friend['last_name'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment