Python 함수(1)
# 함수 만들기 def func_muliply(x): y1 = x * 10 y2 = x * 20 y3 = x * 30 return y1, y2, y3 a, b, c = func_muliply(10) print(a, b, c) # 100 200 300 # *args(unpacking) Tuple type def args_func(*args): for i, v in enumerate(args): print('Result: {}, '.format(i), v) print('------') args_func('Lee') args_func('Lee', 'Park') args_func('Lee', 'Park', 'Kim') # Result: 0, Lee # ------ # Result: 0, Lee # Result:..
2022.12.15