26 lines
502 B
Python
26 lines
502 B
Python
|
|
# https://www.w3schools.com/python/python_ref_list.asp
|
|
# https://www.quackit.com/python/reference/python_3_list_methods.cfm
|
|
|
|
programMessage = '''
|
|
The extend() method appends one list to another list.
|
|
|
|
'''
|
|
|
|
print(programMessage)
|
|
|
|
|
|
basicList = [1, 34, 99, 87, 14]
|
|
print(f"basicList = {basicList}")
|
|
|
|
myList = [111, 399, 1234]
|
|
print(f"myList = {myList}")
|
|
|
|
print("\nExtending basicList with myList\n")
|
|
|
|
basicList.extend(myList)
|
|
|
|
print(f"basicList = {basicList}")
|
|
print(f"myList = {myList}")
|
|
|
|
print("\n")
|