# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3.8.3 64-bit
#     metadata:
#       interpreter:
#         hash: aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49
#     name: Python 3.8.3 64-bit
# ---

def inc_number(number, val):
    number += val
   # return number


# +
my_number = 10
val = 1

print(inc_number(my_number, val))
print(my_number)


# -

def increment_list1(lst, val):
    for list_val in lst:
        list_val += val


# +
my_list = [1, 2, 3]
val = 1

print(increment_list1(my_list, val))
print(my_list)


# -

def increment_list2(lst, val):
    for i in range(len(lst)):
        lst[i] = lst[i] + val


# +
my_list2 = [1, 2, 3]
val2 = 10

print(increment_list2(my_list2, val2))
print(my_list2)
# -



StarcoderdataJupyterScriptsDedupFiltered