Advertisement
gauravssnl

using locals plus dictionary string formatting

Sep 27th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. #using locals() with Dictionary string formatting
  2.  
  3. def show_name(text):
  4.     print "Your name: %(text)s"%locals()
  5.  
  6. show_name("gauravssnl")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement