# -*- coding: utf-8 -*-
"""
Created on Wed May 12 20:39:55 2021

@author: root
"""
t = (1, 2, 3)
a, b, c = t
print("a=", a, "b=", b, "c=", c)

# a, b = t             # 에러
# a, b, c, d = t       # 에러

my_dict = {"Hello": 15, "Goodbye": 5}
k, v = list(my_dict.items())[0]
print("First key:", k, "First value:", v)

k, v = my_dict.items()
print(k)
print(v)

#--------------------------------------

ll = [1, 2, 3, 4, 5, 6]
a, *b, c = ll
print("a=", a, "b=", b, "c=", c)
print(a+b[1])

#---------------------------------------
def addall(*args):
        total = 0
        for x in args:
                total += x
        return total

print(addall(1,2,4))
print(addall(1,2,3,4,5,6))
#---------------------------------

def say_hello(**kwargs):
    for key, value in kwargs.items():
        print("{0} = {1}".format(key, value))

say_hello(name="yasoob")
say_hello(name="Richard", country="US")


