Welcome To The World Of Hacking


Learn Hacking|Teach Hacking|Learn To Secure|Learn To Code

Friday

PYTHON TUTORIAL 10: MORE ON LIST FUNCTIONS

numbers=[5,6,7,2,1,9]

print "Length of numbers=",len(numbers)

print "Maximum no in the list=",max(numbers)

print "Minimum no in the list=",min(numbers)

numbers[2]=42 #'7' is replaced by '42'

print "After replacing 'numbers' becomes ",numbers

del numbers[2] #deletes the numbers '42'

print "After deleting '42' from the list, the new 'numbers' is ",numbers





No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...