Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. def lue_viesti():
  2.     rivit = []
  3.     jatko = True
  4.     while jatko:
  5.         rivi = input()
  6.         rivit.append(rivi)
  7.         if rivi == "":
  8.             jatko = False
  9.     print(rivit)
  10.     for rivi in rivit:
  11.         print(rivi)
  12.  
  13. def main():
  14.     print("Syota viestin tekstiriveja. Lopeta syottamalla tyhja rivi.")
  15.     viesti = lue_viesti()
  16.  
  17.     print("Sama huutaen:")
  18. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement