cfabio

Functions.py

Dec 18th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. def myPrint(name) :
  2.     print(name)
  3.     #return None
  4.  
  5. myPrint("hello")
  6.  
  7.  
  8. def myPrint(name, prefix="I am") :
  9.     #print separate automatically the strings with a space
  10.     print(prefix, name)
  11.     return None
  12.  
  13. myPrint("Fabio")
  14. myPrint("Fabio", prefix="I am not")
  15.  
  16.  
  17. def spam() :
  18.     global eggs
  19.     eggs = 'Hello'
  20.     print(eggs)
  21.  
  22. eggs = 42
  23. spam()
  24. print(eggs)
Advertisement
Add Comment
Please, Sign In to add comment