Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/feed-rss2.php on line 8
‘#ecf0f3’ Articles at Courses by Ken https://kenscourses.com/tc101winter2015 Facilitator of Learning Experiences Thu, 09 Apr 2015 16:58:02 +0000 en hourly 1 https://creativecommons.org/licenses/by/4.0/ Creation and use of lists in Python https://kenscourses.com/tc101winter2015/2015/creation-and-use-of-lists-in-python-4/ Thu, 09 Apr 2015 16:58:02 +0000 https://jorgepadilla95.withknown.com/2015/creation-and-use-of-lists-in-python Continue reading ]]>

I used the Python IDLE where I create and use a very simple list. Check it out.

To create a list you just have to type a name and in [] the things you want in the list, like this list=[1,6,5,4,]each of the components of the list has to be separated with a comma or they will be recognized as one component, the lists components have numbers, the first one is the number 0, ne next one 1 and like that untill the end, the last component also could be -1, the one before -2 and like that until the first one. to use list this commands has to be known.

list.append(x)

Add an item to the end of the list. Equivalent to a[len(a):] = [x].

list.extend(L)

Extend the list by appending all the items in the given list. Equivalent to a[len(a):] = L.

list.insert(ix)

Insert an item at a given position. The first argument is the index of the element before which to insert, so a.insert(0, x) inserts at the front of the list, and a.insert(len(a), x) is equivalent to a.append(x).

list.remove(x)

Remove the first item from the list whose value is x. It is an error if there is no such item.

list.pop([i])

Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list. (The square brackets around the i in the method signature denote that the parameter is optional, not that you should type square brackets at that position. You will see this notation frequently in the Python Library Reference.)

list.clear()

Remove all items from the list. Equivalent to del a[:].

list.index(x)

Return the index in the list of the first item whose value is x. It is an error if there is no such item.

list.count(x)

Return the number of times x appears in the list.

list.sort()

Sort the items of the list in place.

list.reverse()

Reverse the elements of the list in place.

list.copy()

Return a shallow copy of the list. Equivalent to a[:].

Source: docs.python.org

 

 

]]>
https://creativecommons.org/licenses/by/4.0/
Creation and use of lists in Python https://kenscourses.com/tc101winter2015/2015/creation-and-use-of-lists-in-python-3/ Sat, 04 Apr 2015 03:41:45 +0000 https://digiart.withknown.com/2015/creation-and-use-of-lists-in-python Continue reading ]]>

– Creation and use of lists in Python                                                                @PablO_CVi

To create a list you just have to type a name and in [] the things you want in the list, like this list=[1,6,5,4,] each of the components of the list has to be separated with a comma or they will be recognized as one component, the lists components have numbers, the first one is the number 0, ne next one 1 and like that untill the end, the last component also could be -1, the one before -2 and like that until the first one. to use list this commands has to be known.

list.append(x)

Add an item to the end of the list. Equivalent to a[len(a):] = [x].

list.extend(L)

Extend the list by appending all the items in the given list. Equivalent to a[len(a):] = L.

list.insert(ix)

Insert an item at a given position. The first argument is the index of the element before which to insert, so a.insert(0, x) inserts at the front of the list, and a.insert(len(a), x) is equivalent to a.append(x).

list.remove(x)

Remove the first item from the list whose value is x. It is an error if there is no such item.

list.pop([i])

Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list. (The square brackets around the i in the method signature denote that the parameter is optional, not that you should type square brackets at that position. You will see this notation frequently in the Python Library Reference.)

list.clear()

Remove all items from the list. Equivalent to del a[:].

list.index(x)

Return the index in the list of the first item whose value is x. It is an error if there is no such item.

list.count(x)

Return the number of times x appears in the list.

list.sort()

Sort the items of the list in place.

list.reverse()

Reverse the elements of the list in place.

list.copy()

Return a shallow copy of the list. Equivalent to a[:].

Source: docs.python.org

My code: https://github.com/PablOCVi/Mastery/blob/master/Mastery23.py

]]>
https://creativecommons.org/licenses/by/4.0/