dictionary

at first, you need to create a dictionary. The brackets should be {} The name and date of the coding is the key of the dictionary luzhizhou and 1125 is the content related with the key If you want to print it,please follow the form,with in the [],youneed to writhe the name of the key.

list and tuple

tuple 1.empty tuple:write nothing inside tup1 = () 2.one tuple:remember to print “,”after tup1 = (‘lu’,) 3.example: tup1[0] means that the first one ofthe tuple, tup2[0:3] means that the first 4 of the tuple tup1 = (‘lu’, ‘zhi’, ‘zhou’,2019)tup2 = (1, 2, 3, 4, 5, 6, 7 )print(tup1[0])print(tup2[0:3]) list:alomst the same meaning of tuple list1 …

Create your own website, free on WordPress.com.Create your own website.
Start free