<filename>demo/function.py
# 如果为整数 +1 为负数 -1
def plus_one(num):
    plus = False
    if num >= 0:
        num = num + 1
        plus = True
    else:
        num = num - 1
        plus = False
    return num, plus


num = 20
print(plus_one(num))

if num >= 18:
    print('adult')
else:
    print('teenager')


def print_details(nums):
    print(nums)


print("end")


print_details(123)

<filename>demo/function.py
# 如果为整数 +1 为负数 -1
def plus_one(num):
    plus = False
    if num >= 0:
        num = num + 1
        plus = True
    else:
        num = num - 1
        plus = False
    return num, plus


num = 20
print(plus_one(num))

if num >= 18:
    print('adult')
else:
    print('teenager')


def print_details(nums):
    print(nums)


print("end")


print_details(123)

# 如果为整数 +1 为负数 -1