'''
import time
def coroutineA():
n=0
while True:
n=(yield n)
time.sleep(1)
if n%10==3 or n%10==6 or n%10==9:
print('A : nothing')
else:
print('A : ', n)
n+=1
n=0
A=coroutineA()
A.__next__()
while True:
n=A.send(n)
time.sleep(1)
if n%10==3 or n%10==6 or n%10==9:
print('B : nothing')
else:
print('B :',n)
n+=1
'''
'''
a, b = input().split()
a = int(a)
b= int(b)
print(a+b, a-b)
print(a-b)
'''
'''
def calcu(a, b):
s = a+b
m = a-b
return (s, m)
a, b = input().split()
a = int(a)
b = int(b)
print(calcu(a, b))
'''
'''
g = 99
def func():
global g += 1
'''
'''
a = 10
b = 20
def func():
global a
global b
t = a
a = b
b = t
print(a, b)
'''
a = 10
b = 20
def func():
global a
global b
t = a
a = b
b = t
print(a, b)
def deco():
def new_func():
print('a와 b의 값이 교환되었습니다.')
func()
new_func()
deco()
top of page
실제 작동 상태를 확인하려면 라이브 사이트로 이동하세요.
210429
210429
댓글 0개
좋아요
댓글(0)
bottom of page