Advertisement
wagner-cipriano

Passagem de parametros em python (completo)

Oct 15th, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. from __future__ import print_function      #Compatibilidade func print python 2/3
  2. #Passagem de parametros em python (completo)
  3.  
  4. def MyFunc(l, i, s):
  5.     """ teste de passagem de parametros """
  6.     l.sort()
  7.     i += 1
  8.     s = 'INI-%s-FIM' %(s)
  9.  
  10. l = [2,5,3,2,0,1]; i = 10; s = 'mcpy';
  11. print('\n  l:  ', l, '\n  i:  ', i, '\n  s:  ', s);
  12. MyFunc(l, i, s)
  13. print('\n  l:  ', l, '\n  i:  ', i, '\n  s:  ', s);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement