Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ask(prompt):
- text = "what is your" + prompt + "?\n"
- answer = raw_input(text)
- return answer, prompt
- name= ask('name')
- gender =ask('gender')
- age = ask('age')
- nga = [name,gender,age]
- def printNicely(list):
- for a, p in list:
- print 'Your {0} is {1}.'.format(p,a)
- printNicely(nga)
Advertisement
Add Comment
Please, Sign In to add comment