Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> myList=[1,2,3,4,5] >>> import random >>> random.shuffle(myList) >>> print (myList) [2, 4, 3, 5, 1] >>> #dictionary >>> #hash >>> #key value pair >>> products={"IPad" : 850, "Surface" : 1200, "Kindle" : 100, "Galaxy" : 500} >>> print(products["Kindle"]) 100 >>>
No comments:
Post a Comment