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 = [‘lu’, ‘zhi’, ‘zhou’,2019]
list2 = [1, 2, 3, 4, 5, 6, 7 ]
print(list1[0])
print(list2[0:3])

!!! be care of the brackets

For

This is a spanish dictionary that I use for testing my spanish words.

When I start it , it will show ten spanish word gradually.If I know the first word, I wil press 0,then it will show the next word,but if I do not know the first word, I will press 1, then it will show the chinese meaning for me.It is useful.

Design a site like this with WordPress.com
Get started