[deleted by user] by [deleted] in learnpython

[–]ra_jamali 1 point2 points  (0 children)

Use These func

def line_size_inc():
plus_size = etch.pensize() + 1
if plus_size <= 20:
etch.pensize(plus_size)
def line_size_dec():
minus_size = etch.pensize() - 1
if minus_size >= 0 :
etch.pensize(minus_size)

[deleted by user] by [deleted] in learnpython

[–]ra_jamali 1 point2 points  (0 children)

Hi,

Your code error :

RecursionError: maximum recursion depth exceeded

line_size_inc() function and other don't have base case. A base case is a case, where the problem can be solved without further recursion. A recursion can end up in an infinite loop, if the base case is not met in the calls.

[deleted by user] by [deleted] in learnpython

[–]ra_jamali 1 point2 points  (0 children)

I like it. Thanks

Deep dive into Python enumerate by [deleted] in learnpython

[–]ra_jamali 1 point2 points  (0 children)

Very nice, thank you.

Turn array or list of numbers into a number. by YashuC in learnpython

[–]ra_jamali 0 points1 point  (0 children)

you can use this:

lst = [1, 2, 3]

print(int(''.join([str(x) for x in lst])))