Started Rectangle Project
This commit is contained in:
commit
26e1253c0d
39 changed files with 544 additions and 0 deletions
16
homework06/functions/functions02.py
Normal file
16
homework06/functions/functions02.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# list as an input parameter
|
||||
def myFunction4(listParameter):
|
||||
for listItem in listParameter:
|
||||
print("\tlistParameter item: ",listItem)
|
||||
myList = listParameter
|
||||
myList.sort()
|
||||
return( myList ) # Return a list
|
||||
|
||||
# ======================== Main Program =============================
|
||||
|
||||
fruits = ['Mango','Banana','Cherry', 'Apples']
|
||||
print("\n Starting list: ",fruits)
|
||||
print("\n")
|
||||
|
||||
sortedFruits = myFunction4(fruits)
|
||||
print("\n Returned list: ",sortedFruits)
|
||||
Loading…
Add table
Add a link
Reference in a new issue