Format of Python3

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 print('{0},{1}'.format('zhangk', 32))   print('{},{},{}'.format('zhangk','boy',32))   print('{name},{sex},{age}'.format(age=32,sex='male',name='zhangk'))   # Format qualifier # It has a rich "format qualifier" (grammar is {} with: number), for example:   # Filling and aligning # Filling is often used with alignment. # ^、<、>They are center, left alignment, right alignment, and back width. # :The character that is filled with the back of the number can only be one charact...

The second part of Python

What data type? int 1, 2, 3 Operational float 1.2 str It is used to store certain information. list =[1,2 ,3 ""Yes" is used to store large amounts of information. touple(1,2, 3,) Used to store invariant lists, which can only be read. dic ={"I: "Jin Liao Yuan" "you": "Beijing"} used to store data relations, easy to find. set = {1, 2, 3, 4} Set the difference set, union and intersection of sets.#Capitalization of strings #String manipulation# s = 'alexWusir'# # s1 = s.capitalize()# # print(s1)## #Uppercase, lowercase# s2 = s.upper()# s3 = s.lower()## print(s2, s3)# s...