Advertisement
tpaper

Source #96-1

Sep 3rd, 2014
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. test = [['a','b','c'],\
  2.     ['d','e','f'],\
  3.     ['g','h','i']]
  4.      
  5. def display(x):
  6.   for current in x:
  7.     print current
  8.   print
  9.    
  10. def substitute(x):
  11.   for row in range(0,len(x)):
  12.     for col in range(0,len(x[row])):
  13.       temp = x
  14.       temp[row][col] = '*'
  15.       display(temp)
  16.   print 'x is equal to:'
  17.   display(x)
  18.  
  19. substitute(test)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement