Skip to content

Instantly share code, notes, and snippets.

@alicerunsonfedora
Created August 29, 2018 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alicerunsonfedora/00dcf0862e0ef35cabb45e61164c082f to your computer and use it in GitHub Desktop.
Save alicerunsonfedora/00dcf0862e0ef35cabb45e61164c082f to your computer and use it in GitHub Desktop.
Greeter
# Greeting.py
# A greeting generator
# (C) 2018 Marquis Kurt.
def get_greeting(greeting_list):
"""
Gets a greeting from a list and generates a message
:param greeting_list: The array with the string components of a message
:returns: A concatenated string of the array
"""
greeting_message = ""
for item in greeting_list:
greeting_message = greeting_message + item
return greeting_message + "!"
if __name__ == "__main__":
greeting = ["o", "h", "a", "y", "o", "u"]
print(get_greeting(greeting))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment