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
Post a Comment