It depends on what's elegant, and beauty is in the eye of the beholder.. def recurse(n): print(”do be do be do”) if n>0: recurse(n-1)
Regards, Morten søn. 22. des. 2019, 21:37 skrev Batuhan Taskaya <isidenti...@gmail.com>: > I encounter with cases like doing a function 6 time with no argument, or > same arguments over and over or doing some structral thing N times and I > dont know how elegant I can express that to the code. I dont know why but I > dont like this for _ in range(n): do() thing. Any suggestions? > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list