fork(1) download
  1. def do(tuples):
  2. for x,y in tuples:print' '*x+'-'*(y-x)
  3.  
  4. def main():
  5. tests = [(),
  6. ((0,7),(5,6),(3,6)),
  7. ((5,20),(5,20),(2,10),(15,19)),
  8. ((28, 35), (34, 40), (39, 44))]
  9. c = 1
  10. for t in tests:
  11. print `c`,"=>"
  12. do(t)
  13. c+=1
  14.  
  15. if __name__=='__main__':
  16. main()
Success #stdin #stdout 0.01s 7692KB
stdin
Standard input is empty
stdout
1 =>
2 =>
-------
     -
   ---
3 =>
     ---------------
     ---------------
  --------
               ----
4 =>
                            -------
                                  ------
                                       -----