Monday, July 23, 2018

Python List - append and remove

#!/usr/bin/python

mylist = []
mylist.append("one")
mylist.append("two")
mylist.append("three")
mylist.append("four")
mylist.append("five")

print (mylist)
print ("=====================")

mylist.remove("five")
mylist.remove("one")
print (mylist)

1 comment:

  1. Thank you so much for sharing this blog with us. It provides a collection of useful information. You obviously put a lot of effort into it! Best packet tracer service provider.

    ReplyDelete