python: curly bracket and colon -


homework question, write function called like: replace_all({'a':'123', 'b':'zab'}, 'acb')

what function declaration like?

what kind of variable 'a':'123' , {} ?

it's dictionary (mapping).

see http://docs.python.org/library/stdtypes.html#dict.

generally, when define function in python, don't need types. python dynamically typed language.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -