Create a method `sayHello`/`say_hello`/`SayHello` that takes as input a name, city, and state to welcome a person. Note that `name` will be an array consisting of one or more values that should be joined together with one space between each, and the length of the `name` array in test cases will vary.

Example:

```python
say_hello(['John', 'Smith'], 'Phoenix', 'Arizona')
```

This example will return the string `Hello, John Smith! Welcome to Phoenix, Arizona!`

Difficulty: introductory

Starter code:

def say_hello(name, city, state):
	

Solutions:
def say_hello(name, city, state):
  return "Hello, {}! Welcome to {}, {}!".format(" ".join(name), city, state)


def say_hello(name, city, state):
    return f"Hello, {' '.join(name)}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    return 'Hello, %s! Welcome to %s, %s!' % (' '.join(name), city, state)

def say_hello(name, city, state):
    return 'Hello, ' + ' '.join(name) + '! Welcome to ' + city + ', ' + state + '!'

def say_hello(name, city, state):
    greeting = "Hello, {name}! Welcome to {city}, {state}!".format(
        name=" ".join(name),
        city=city,
        state=state
    )
    
    return greeting


say_hello = lambda n, c, s: 'Hello, {}! Welcome to {}, {}!'.format(' '.join(n), c, s)

def say_hello(name, city, state):
    greetName = ''
    for n in name:
        if n == name[-1]:
            greetName += n
            greetName += '!'
        else:
            greetName += n
            greetName += ' '
    return 'Hello, ' + greetName + ' Welcome to ' + city + ', ' + state + '!'

def say_hello(name, city, state):
    name = " ".join(name)
    return "Hello, %s! Welcome to %s, %s!" %(name,city,state)

say_hello = lambda n, c, s: "Hello, " + " ".join(n) + "! Welcome to " + c + ", " + s + "!"

from typing import List

def say_hello(name: List[str], city: str, state: str) -> str:
    """ Prepare a greeting based on input data. """
    return "Hello, {n}! Welcome to {c}, {s}!".format(n=" ".join(name), c=city, s=state)

def say_hello(name, city, state):

    string="".join([str(i)+ " " for i in name])
    string_neu=string[:-1]
    city=str(city)
    state=str(state)
    
    
    
    return ("Hello, " + string_neu +"! Welcome to " + city +", " + state + "!")

def say_hello(name, city, state):
    aa = ' '.join(name)
    return ('Hello, ' + aa +'! Welcome to ' + city + ', ' + state + '!')

def say_hello(name, city, state):
    name = " ". join(name)
    return 'Hello, %(name)s! Welcome to %(city)s, %(state)s!'%vars()

def say_hello(name, city, state):
    real_name = ""
    
    for n in name:
        real_name += n + " "
    
    return 'Hello, {0}! Welcome to {1}, {2}!'.format(real_name[:-1],city,state)

def say_hello(name, city, state):
    kitas=' '.join(name)
    return f'Hello, {kitas}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    names = ''
    for i in name:
        names += i + ' '
    names = names.rstrip()
    return "Hello, {names}! Welcome to {city}, {state}!".format(names = names, city = city, state = state)

def say_hello(name, city, state):
    str_name = ""
    for i in name:
        str_name += i + " "
    str_name = str_name[:-1]
    return "Hello, {name}! Welcome to {city}, {state}!".format(name = str_name, city=city, state=state)

def say_hello(name, city, state):
    return "Hello," + (" {}"*len(name)).format(*name)+f"! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    a = ' '.join(name)
    return f'Hello, {a}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    return ('Hello, ' + ' '.join(name) + f'! Welcome to {city}, {state}!')

def say_hello(name, city, state):
    element = ""
    for x in name:
        element = element + x + " "
    element = element[:-1]  
    return("Hello, "+element+"!"+" Welcome to "+city+", "+state+"!")

def say_hello(name, city, state):
    nameS = " ".join(name)
    return f"Hello, {nameS}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    return 'Hello, %s! Welcome to %s, %s!'%(' '.join(n for n in name), city, state)


def say_hello(name, city, state):
    who = ' '.join(name)
    return f'Hello, {who}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    st='Hello, '+' '.join(name)+'! Welcome to '+city+', '+state+'!'
    return st

def say_hello(name, city, state):
    string = ' '
    string1 = string.join(name)
    return "Hello, {string1}! Welcome to {city}, {state}!".format(string1=string1, city=city, state=state)

def say_hello(name, city, state):
    lis = []
    lis.append("Hello,")
    lis.append(" ".join(name)+"!")
    lis.append("Welcome to")
    lis.append(city+",")
    lis.append(state+"!")
    return " ".join(lis)

def say_hello(name, city, state):
    n = ""    
    for el in name:
        n += " " + el
    return f'Hello,{n}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    fl= " ".join(n for n in name)
    return f"Hello, {fl}! Welcome to {city}, {state}!" 

def say_hello(name, city, state):
    name = " ".join(name) 
    print(name)
    return f"Hello, {name}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    satz = " ".join(name)
    return "Hello, " + satz + "! Welcome to " + city + ", " + state + "!"

def say_hello(name, city, state):
    names = ' '.join(name)
    a = "Hello, {}! Welcome to {}, {}!".format(names, city, state)
    return a

def say_hello(name, city, state):
    separator = ' '
    name_1 = separator.join(name) 
    return f'Hello, {name_1}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    string = ' '.join(name)
    return f'Hello, {string}! Welcome to {city}, {state}!'


def say_hello(name, city, state):
    full_name = ''
    for n in name:
        full_name += n
        full_name += ' '
    return 'Hello, {}! Welcome to {}, {}!'.format(full_name[:-1], city, state)

def say_hello(name, city, state):
    c=""
    for x in name:
        c=c+x+" "
    c=c.rstrip(" ")
    return "Hello, "+c+"! Welcome to "+city+", "+state+"!"

def say_hello(name, city, state):
    fullname = (' '.join(name))
    return f'Hello, {fullname}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    full_name = ''
    for i in range(len(name)):
        full_name +=name[i]+' '
    if full_name[-1] ==' ':
        full_name = full_name[:-1]
    return 'Hello, {}! Welcome to {}, {}!'.format(full_name, city, state)

def say_hello(name, city, state):
    name1=" ".join(name)
    return "Hello, {}! Welcome to {}, {}!".format(name1,city,state)

def say_hello(name, city, state):
    full = name[0]
    for x in range(len(name) - 1) :
        full = full + " " + name[x + 1]
    return f"Hello, {full}! Welcome to {city}, {state}!"

def say_hello(n,c,s):
    return ''.join(f"Hello, {' '.join(n)}! Welcome to {c}, {s}!")

def say_hello(name, city, state):
    return 'Hello, {x}! Welcome to {city}, {state}!'.format(x=' '.join(name), city=city, state=state)


def say_hello(name, city, state):
    
    return "Hello, " + " ".join(str(item) for item in name) +"!" + " Welcome to " + city + ", " + state +"!"

def say_hello(name, city, state):
    res = "Hello, "
    for n in name:
        res += n + " "
    res = res[:-1]
    res += "! Welcome to "
    res += city + ", "
    res += state + "!"
    return res

def say_hello(name, city, state):
    n = ""
    for i in range(len(name)):
        n = n + " " + name[i]
        
    return f'Hello, {n[1:]}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    x = ""
    for i in name:
        x += i+" "
    y = x.strip()
    return "Hello, {}! Welcome to {}, {}!".format(y, city, state)

def say_hello(name, city, state):
    strname = " ".join(str(x) for x in name) 
    return 'Hello, ' + strname + '! Welcome to ' + str(city) + ', ' + str(state) + '!'

def say_hello(name, city, state):
    return f'Hello, {" ".join(name).strip(" ")}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    newname = ' '.join(name)
    return f'Hello, {newname}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    """
    hello
    """
    return "Hello, {}! Welcome to {}, {}!".format(" ".join(name), city, state)

def say_hello(name, city, state):
    x = "Hello, {}! Welcome to " + city + ", " + state + "!"
    temp = ""
    for i in name:
        temp+=i+" "
    temp = temp[:-1]
    z = x.format(temp)
    return z

def say_hello(name, city, state):
    nombre=' '.join(x for x in name)
    return (f'Hello, {nombre}! Welcome to {city}, {state}!')

def say_hello(name, city, state):
    name_str = " ".join(name)
    return f"Hello, {name_str}! Welcome to {city}, {state}!"

import unittest


def say_hello(name, city, state):
    name = ' '.join(name)
    city_and_state = ', '.join([city, state])
    return f'Hello, {name}! Welcome to {city_and_state}!'
    
    
class TestSayHello(unittest.TestCase):
    def test_say_hello(self):
        name, city, state = ['John', 'Smith'], 'Phoenix', 'Arizona'
        actual = say_hello(name, city, state)
        self.assertEqual(actual, 'Hello, John Smith! Welcome to Phoenix, Arizona!')


def say_hello(name, city, state):

    blk = " "
    return "Hello, " + blk.join(name) + "! Welcome to " + city + ", " + state + "!"

def say_hello(name, city, state):
    s = " ".join(name)
    return f"Hello, {s}! Welcome to {city}, {state}!"



def say_hello(name, city, state):
    word ="Hello, "
    for i in name:
        word += str(i) + " "
    result =word[:-1]
    result +="! Welcome to " + str(city) + ", " + str(state) + "!" 
    return result

def say_hello(name, city, state):
    
    welcome = (" Welcome to "+ city+", " +  state + "!")
    names = " ".join(name)
    
    return "Hello, "+names+"!" + welcome

def say_hello(name, city, state):
    str_name = ' '.join(name)
    return "Hello, {str_name}! Welcome to {city}, {state}!".format(str_name = str_name, city = city, state = state)
print(say_hello(['John', 'Smith'], 'Phoenix', 'Arizona'))

def say_hello(name, city, state):
    #your code here
    nama = " ".join(name)
    kota = "".join(city)
    nega = "".join(state)
    
    return "Hello, "+ nama +"! Welcome to "+ kota+", "+ state+"!"

def say_hello(name, city, state):
    greeting = f"Hello, {' '.join(name)}! Welcome to {city}, {state}!"
    return greeting

def say_hello(name, city, state):
    return 'Hello, ' + ' '.join(name) + '! ' + f'Welcome to {city}, {state}!'

def say_hello(name, city, state):
    str1 = ' '.join(name)
    return(f'Hello, {str1}! Welcome to {city}, {state}!')

def say_hello(name, city, state):
    return f'Hello, {" ".join(n for n in name)}! Welcome to {city}, {state}!'


def say_hello(name, city, state):
    x = ' '.join(n for n in name)
    return f"Hello, {x}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    nm = ' '.join(name)
    return f"Hello, {nm}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    full_name = ' '.join(elt for elt in name)
    return 'Hello, %s! Welcome to %s, %s!' % (full_name, city, state)

def say_hello(name, city, state):
    full_name = ""
    for i in name:
        full_name += f" {i}"
    return f"Hello,{full_name}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    name = " ".join([n for n in name])
    return f"Hello, {name}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    n = ""
    for i in name:
        n = n + " " + i
    txt = "Hello," + n + "! Welcome to {}, {}!"
    return txt.format(city,state)

def say_hello(name, city, state):
    return "Hello, %s! Welcome to %s, %s!" % (' '.join(s for s in name), city, state)

def say_hello(name, city, state):
    a=' '.join(name)+'!'
    r= 'Hello, '+str(a) +' Welcome to {}, {}!'.format(city,state)
    return ''.join(r)

def say_hello(name, city, state):
    l = ' '.join(name)
    return f'Hello, {l}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    nstr = ""
    c = city
    s = state
    for n in name:
      nstr += n + " "
    nstr = nstr.strip()
    txt = 'Hello, {}! Welcome to {}, {}!'
    return txt.format(nstr, c, s)

def say_hello(name, city, state):
    
    new_name = ''
    
    for x in name:
        if x != name[-1]:
            new_name += (x + ' ')
        
        else:
            new_name += x
    
    return 'Hello, ' + new_name + '! Welcome to ' + city + ', ' + state + '!'

def say_hello(name, city, state):
    x= ' '.join(name)
    return ('Hello, ' + str(x) + '!'+' '+'Welcome to ' + str(city) +', '+ str(state) +'!' )

def say_hello(name, city, state):
    name_=''
    for i in name:
        name_+=i+' '
    name_=name_[:-1]
    return 'Hello, {}! Welcome to {}, {}!'.format(name_, city, state)

def say_hello(name, city, state):
    cunt = ' '.join(name)
    return f"Hello, {cunt}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    #your code here
    name1 = ' '.join(name)
    return f'Hello, {name1}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    name = ' '.join(part for part in name)
    return f'Hello, { name }! Welcome to {city}, {state}!'

from typing import List


def say_hello(name: List[str], city: str, state: str) -> str:
    return f"Hello, {' '.join(name)}! Welcome to {city}, {state}!"


def say_hello(name, city, state):
    x = "Hello, " , ' '.join(name) , "! Welcome to ", city , ", " , state , "!"
    return ''.join(x)

def say_hello(name, city, state):
    space = " "
    return "Hello, " + space.join(name) + "! Welcome to " + city + ", " + state + "!"

def say_hello(name, city, state):
    fname = ' '.join(name)
    return f'Hello, {fname}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    
    return f"Hello, {' '.join(ad for ad in name)}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    som = 'Hello, {joo}! Welcome to {naem}, {state}!'.format(joo = ' '.join(name), naem = city, state = state)
    return som
#your code here


def say_hello(name, city, state):
    namestring = " ".join(name)
    return f'Hello, {namestring}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    a = ''
    for x in range(0,len(name)):
        a = a + ' ' + ''.join(name[x])
    return 'Hello, ' + a[1:] + '! Welcome to ' + city + ', ' + state + '!' 
    


def say_hello(name, city, state):
    b = ' '.join(name)
    return 'Hello, {}! Welcome to {}, {}!'.format(b,city,state)

def say_hello(name, city, state):
    full_name = ''
    for index, word in enumerate(name):
        full_name += name[index]
        if index < len(name) -1:
            full_name += ' '
    text = 'Hello, ' + full_name + '! Welcome to ' + city + ', ' + state + '!'
    return text

def say_hello(name, city, state):
    
    txt1 = 'Hello, {} {} {}! Welcome to {}, {}!'
    txt2 = 'Hello, {} {}! Welcome to {}, {}!'
    txt3 = 'Hello, {} {} {} {}! Welcome to {}, {}!'
    
    
    l = len(name)
    
    if l == 3:
        return txt1.format(name[0], name[1], name[2], city, state)
    elif l == 4:
        return txt3.format(name[0], name[1], name[2], name[3], city, state)
    else:
        return txt2.format(name[0], name[1], city, state)

def say_hello(name, city, state):
    name = ' '.join (i for i in name)
    return f'Hello, {name}! Welcome to {city}, {state}!'

def say_hello(name, city, state):
    x = " "
    y = x.join(name)
    return "Hello, {}! Welcome to {}, {}!".format(y, city, state)

def say_hello(name, city, state):
    nam=''
    if len(name)==2:
        nam=name[0]+' '+name[1]
    elif len(name)==3:
        nam=name[0]+' '+name[1]+' '+name[2]
    elif len(name)==4:
        nam=name[0]+' '+name[1]+' '+name[2]+' '+name[3]
    elif len(name)==5:
        nam=name[0]+' '+name[1]+' '+name[2]+' '+name[3]+' '+name[4]
    
    return f"Hello, {nam}! Welcome to {city}, {state}!"

def say_hello(name, city, state):
    name_join = ' '.join([x for x in name])
    sentence = 'Hello, {}! Welcome to {}, {}!'.format(name_join, city, state)
    return sentence

def say_hello(name, city, state):
    
    name = " ".join(name)
    
    return "Hello," + " " + name+ "!" +" Welcome to"+ " " + city + ","+" " + state + "!"

def say_hello(name, city, state):

    new_name = ' '.join(name)
    return 'Hello, {}! Welcome to {}, {}!'.format(new_name, city, state)


def say_hello(name, city, state):
    k = ' '.join(name)
    return f'Hello, {k}! Welcome to {city}, {state}!'

def say_hello(n, c, s):
    b = ''
    for i in range(len(n)):
        b += ' ' + n[i]
    return 'Hello,' + b +'! Welcome to ' + c + ', ' + s +'!'