Use variable as a key,usevariable,table = {'Py
Use variable as a key,usevariable,table = {'Py
table = {'Python': 'Guido van Rossum', 'Perl': 'Larry Wall', 'Tcl': 'John Ousterhout' }language = 'Python'creator = table[language]print creator
- Looping through dictionaries,,#the key and
- for each loop with dictionary,loopdictionary,D = {'a':
- String Formatting with Dictionaries,,phonebook =
- Demonstrates the for loop with a string,demonstrateslo
- String method: to upper case,methodupper,quote = 'Pyt
- Escape Codes: \b, \t, \n, \a, \r,escapecodes,s = 'e:\\
热门文章:
相关内容
- Looping through dictionaries,,#the key and
- for each loop with dictionary,loopdictionary,D = {'a':1,
- String Formatting with Dictionaries,,phonebook =
- Demonstrates the for loop with a string,demonstratesloop,word = raw
- String method: to upper case,methodupper,quote = 'Pyt
- Escape Codes: \b, \t, \n, \a, \r,escapecodes,s = 'e:\\Beg
- Escape characters: \n and \t,escapecharacters,s = 'a\nb\tc
- Find substring in a string,substringstring,S = 'xxxxSPA
- Indices may be negative numbers, to start counting from the right. Fo
- Joining strings,joiningstrings,list1 = [ '
评论关闭