Python Forum
i want to shorten a working section
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i want to shorten a working section
#1
i have a working little number guessing game but there is one long repetitiv section that i dont know how to shorten (the section is beneth the line "if durchschnitt2"(line 118) (the hole code is in german if thats a problen i will translate it))
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
import random
werte = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
durchschnitt2 = False
def deutsch():
    runig = True
    while runig:
        while True:
            while True:
                try:
                    runden = int(input("wie viele runden wilst du speilen?:"))
                except ValueError:
                    print ("ungültiger wert. versuche es noch einmal")
                    print ("----------------------------------")
                else:
                    break
            if runden > 15:
                print ("maximal 15 runden")
            else:
                break
 
        for runde in range (runden):
            runde = runde + 1
            print ("----------------------------------")
            print (f"runde {runde}")
            while True:
                while True:
                    while True:
                        try:
                            low = int(input("was soll das minimum sein?:"))
                        except ValueError:
                            print ("ungültiger wert. versuche es noch einmal")
                            print ("----------------------------------")
                        else:
                            break
                    if low < -500000:
                        print ("minimal -500,000")
                    else:
                        break
                print ("----------------------------------")
                while True:
                    while True:
                        try:
                            high = int(input("was soll das maximum sein?:"))
                        except ValueError:
                            print ("ungültiger wert. versuche es noch einmal")
                            print ("----------------------------------")
                        else:
                            break
                    if high > 500000:
                        print ("maximal 500,000")
                    else:
                        break
                if low > high:
                    print ("----------------------------------")
                    print("das minimum kann nicht mehr als das maximum sein")
                    print ("----------------------------------")
                else:
                    break
            print ("----------------------------------")
            number = random.randint(low,high)
            if not durchschnitt2:
                guesses = 0
                while True:
                    while True:
                        try:
                            guessesnuber = int(input("wie viele versuch wilst du haben?:"))                   
                        except ValueError:
                            print ("ungültiger wert. versuche es noch einmal")
                            print ("----------------------------------")
                        else:
                            break
                         
                    if guessesnuber > 100:
                        print("maximal 100 versuche")
                    else:
                        break
                print ("----------------------------------")
                print (f"du hast {guessesnuber} versuche")
            else:
                guesses = 0
                guessesnuber = 9999999999999999999999999999
                print ("----------------------------------")
                print (f"du hast {guessesnuber} versuche")
            while True:
                while True:
                    try:
                        guess = int(input(f"nummer zwischen ({low} - {high}):"))
                    except ValueError:
                        print ("ungültiger wert. versuche es noch einmal")
                        print ("----------------------------------")
                    else:
                        break
                guesses = guesses+1
             
                if guess > high:
                    print (f"das ist mehr als {high}")
                elif guess < low:
                    print(f"das ist weniger als {low}")
                elif guess > number:
                    print (f"{guess} ist zu viel")
                elif guess < number:
                    print (f"{guess} ist zu wenig")
                else:
                    print (f"{guess} ist richtig!")
                    break
                if guesses == guessesnuber:
                    print (f"du hast zu viele versuche gebraucht")
                    break
                else:
                    print (f"du hast noch {guessesnuber-guesses} versuche")
                if guess < number and not guess < low:
                   low = guess
                elif guess > number and not guess > high:
                    high = guess
                print ("----------------------------------")
            if guess == number:
                print (f"du hast {guesses} versuche gebraucht")
                if durchschnitt2:
                    if runde == 1:
                        werte[0] = guesses
                        durchschnitt1 = werte[0]
                    elif runde == 2:
                        werte[1] = guesses
                        durchschnitt1 = durchschnitt1+werte[1]
                    elif runde == 3:
                        werte[2] = guesses
                        durchschnitt1 = durchschnitt1+werte[2]
                    elif runde == 4:
                        werte[3] = guesses
                        durchschnitt1 = durchschnitt1+werte[3]
                    elif runde == 5:
                        werte[4] = guesses
                        durchschnitt1 = durchschnitt1+werte[4]
                    elif runde == 6:
                        werte[5] = guesses
                        durchschnitt1 = durchschnitt1+werte[5]
                    elif runde == 7:
                        werte[6] = guesses
                        durchschnitt1 = durchschnitt1+werte[6]
                    elif runde == 8:
                        werte[7] = guesses
                        durchschnitt1 = durchschnitt1+werte[7]
                    elif runde == 9:
                        werte[8] = guesses
                        durchschnitt1 = durchschnitt1+werte[8]
                    elif runde == 10:
                        werte[9] = guesses
                        durchschnitt1 = durchschnitt1+werte[9]
                    elif runde == 11:
                        werte[10] = guesses
                        durchschnitt1 = durchschnitt1+werte[10]
                    elif runde == 12:
                        werte[11] = guesses
                        durchschnitt1 = durchschnitt1+werte[11]
                    elif runde == 13:
                        werte[12] = guesses
                        durchschnitt1 = durchschnitt1+werte[12]
                    elif runde == 14:
                        werte[13] = guesses
                        durchschnitt1 = durchschnitt1+werte[13]
                    elif runde == 15:
                        werte[14] = guesses
                        durchschnitt1 = durchschnitt1+werte[14]
                     
            elif guesses == guessesnuber:
                print (f"du hast es nicht eraten die numer war {number}")
        if durchschnitt2:
            durchschnitt = durchschnitt1/runden   
            print (f"dein durchschnitt ist {durchschnitt}")
        if not input ("nochmal spielen? (ja/nein):").lower() == "ja":
            runig = False
        else:
            print ("----------------------------------")
(sorry for the long code.)
the section is to calculate the average of how many trys it took you to find the number.
Reply
#2
You could do
1
2
3
4
5
6
if 1 <= runde <= 15:
    werte[runde-1] = guesses
    if runde == 1:
        durchschnitt1 = guesses
    else:
        durchschnitt1 += guesses
« We can solve any problem by introducing an extra level of indirection »
Reply
#3
You repeat this pattern in your code:
1
2
3
4
5
6
7
8
9
10
11
12
while True:
    try:
        runden = int(input("wie viele runden wilst du speilen?:"))
    except ValueError:
        print ("ungültiger wert. versuche es noch einmal")
        print ("----------------------------------")
    else:
        break
if runden > 15:
    print ("maximal 15 runden")
else:
    break
Only write code once and reuse.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
def int_input(prompt, max_value=None, min_value=None):
    while True:
        try:
            value = int(input(prompt))
            if max_value is not None and value > max_value:
                print(f"maximal {max_value} runden")
            elif min_value is not None and value < min_value:
                print(f"minimal {min_value} runden")
            else:
                return value
        except ValueError:
            print("ungültiger wert. versuche es noch einmal")
            print("----------------------------------")
 
 
runden = int_input("wie viele runden wilst du speilen?: ", max_value=15)
low = int_input("was soll das minimum sein?: ", min_value=-500000)
high = int_input("was soll das maximum sein?: ", max_value=500000)
print(runden, low, high)
Combined with the suggestion from Gribouillis you can get some substantial code reduction. This is untested:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import random
 
 
durchschnitt2 = False
 
 
def int_input(prompt, max_value=None, min_value=None):
    while True:
        try:
            value = int(input(prompt))
            if max_value is not None and value > max_value:
                print(f"maximal {max_value} runden")
            elif min_value is not None and value < min_value:
                print(f"minimal {min_value} runden")
            else:
                return value
        except ValueError:
            print("ungültiger wert. versuche es noch einmal")
            print("----------------------------------")
 
 
def deutsch():
    while True:
        runden = int_input("wie viele runden wilst du speilen?:", max_value=15)
 
        for runde in range(1, runden + 1):
            print("----------------------------------")
            print(f"runde {runde}")
            while True:
                low = int_input("was soll das minimum sein?:", min_value=-500000)
                high = int_input("was soll das maximum sein?:", max_value=500000)
                if low > high:
                    print("----------------------------------")
                    print("das minimum kann nicht mehr als das maximum sein")
                    print("----------------------------------")
                else:
                    break
            print("----------------------------------")
            number = random.randint(low, high)
            if not durchschnitt2:
                guesses = 0
                guessesnuber = int_input("wie viele versuch wilst du haben?:", max_value=100)
                print("----------------------------------")
                print(f"du hast {guessesnuber} versuche")
            else:
                guesses = 0
                guessesnuber = 9999999999999999999999999999
                print("----------------------------------")
                print(f"du hast {guessesnuber} versuche")
 
            for guesses in range(guessesnuber):
                guess = int_input(f"nummer zwischen ({low} - {high}):", min_value=low, max_value=high)
                if guess == number:
                    print(f"{guess} ist richtig!")
                    break
                if guess > number:
                    print(f"{guess} ist zu viel")
                    high = guess
                else:
                    print(f"{guess} ist zu wenig")
                    low = guess
                print(f"du hast noch {guessesnuber-guesses} versuche")
                print("----------------------------------")
 
            if guesses < guessesnuber:
                print(f"du hast {guesses} versuche gebraucht")
                if durchschnitt2:
                    if runde == 1:
                        durchschnitt1 = guesses
                    else:
                        durchschnitt1 += guesses
            else:
                print(f"du hast zu viele versuche gebraucht")
                print(f"du hast es nicht eraten die numer war {number}")
        if durchschnitt2:
            durchschnitt = durchschnitt1 / runden
            print(f"dein durchschnitt ist {durchschnitt}")
        if not input("nochmal spielen? (ja/nein):").lower() == "ja":
            return
        print("----------------------------------")
 
 
deutsch()
Reply
#4
thaks for the help but the untested code is not that good but still this helpt a lot so thx
Reply
#5
the flaw is that not ewrything is a "runde" so a rund to play
but you probebly did this in 1 min so im not mad or smt like that
you are way better at coding than me and the fact that it is untested is also impresiv
i woudnt be able to do smt like that without testing so thank you werry much
(sorry for bad spelling)
Reply
#6
i ficst my problem with it :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
def int_input(prompt, type, max_value=None, min_value=None):
    while True:
        try:
            value = int(input(prompt))
            if max_value is not None and value > max_value:
                print(f"maximal {max_value} {type}")
            elif min_value is not None and value < min_value:
                print(f"minimal {min_value} {type}")
            else:
                return value
        except ValueError:
            print("ungültiger wert. versuche es noch einmal")
            print("----------------------------------")
  
  
runden = int_input("wie viele runden wilst du speilen?: ", "runden", max_value=15)
low = int_input("was soll das minimum sein?: ", "" , min_value=-500000)
high = int_input("was soll das maximum sein?: ", "" ,max_value=500000)
print(runden, low, high)
Reply
#7
I think I understand the program better now, but I could be wrong.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import random
 
 
def int_input(prompt, value_type="", max_value=None, min_value=None):
    while True:
        try:
            value = int(input(prompt))
            if max_value is not None and value > max_value:
                print(f"maximal {max_value}{value_type}")
            elif min_value is not None and value < min_value:
                print(f"minimal {min_value}{value_type}")
            else:
                return value
        except ValueError:
            print("ungültiger wert. versuche es noch einmal")
            print("----------------------------------")
 
 
def deutsch(durchschnitt=False):
    count = 0
    runden = int_input("wie viele runden wilst du speilen?: ", " rundden", max_value=15)
    for runde in range(1, runden + 1):
        print("----------------------------------")
        print(f"runde {runde}")
        while True:
            low = int_input("was soll das minimum sein?: ", min_value=-500000)
            high = int_input("was soll das maximum sein?: ", max_value=500000)
            if low > high:
                print("----------------------------------")
                print("das minimum kann nicht mehr als das maximum sein")
                print("----------------------------------")
            else:
                break
        print("----------------------------------")
        number = random.randint(low, high)
        if durchschnitt:
            guessesnuber = None  # Unlimited guesses
        else:
            guessesnuber = int_input("wie viele versuch wilst du haben?: ", max_value=min(100, high-low))
 
        guesses = 0
        while True:
            guesses += 1
            guess = int_input(f"nummer zwischen ({low} - {high}): ", min_value=low, max_value=high)
            if guess == number:
                print(f"{guess} ist richtig!")
                print(f"du hast {guesses} versuche gebraucht")
                if durchschnitt:
                    count += guesses
                else:
                    count += 1
                break
            if guess > number:
                print(f"{guess} ist zu viel")
                high = guess
            else:
                print(f"{guess} ist zu wenig")
                low = guess
            if guessesnuber is not None:
                if guesses >= guessesnuber:
                    print(f"du hast zu viele versuche gebraucht")
                    print(f"du hast es nicht eraten die numer war {number}")
                    break
                print(f"du hast noch {guessesnuber-guesses} versuche")
            print("----------------------------------")
 
    if durchschnitt:
        print(f"dein durchschnitt ist {count / runden}")
    else:
        print(f"{count} von {runden} versuchen erfolgreich absolviert.")
 
 
while True:
    deutsch()
    print("----------------------------------")
    if input("nochmal spielen? (ja/nein): ").lower() != "ja":
        break
I split the replay loop out of deutch() (strange name for a guessing game). Try to make functions that does something you can describe in a few short sentences. I pass durchschnitt in as a variable because global variables are bad and should be avoided.
Reply
#8
deutsch in german for german
i have the game in 3 difrent langues
Reply
#9
i did the value_type thing two on my own yay


heres the entire thing i have now
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
import random
werte = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
durchschnitt2 = False
def int_input_de(prompt, type, max_value=None, min_value=None):
    while True:
        try:
            value = int(input(prompt))
            if max_value is not None and value > max_value:
                print(f"maximal {max_value} {type}")
            elif min_value is not None and value < min_value:
                print(f"minimal {min_value} {type}")
            else:
                return value
        except ValueError:
            print("ungültiger wert. versuche es noch einmal")
            print("----------------------------------")
 
def deutsch():
    runig = True
    while runig:
        runden = int_input_de("wie viele runden wilst du speilen?:", "runden", max_value=15)
        for runde in range (runden):
            runde = runde + 1
            print ("----------------------------------")
            print (f"runde {runde}")
            while True:
                low = int_input_de("was soll das minimum sein?:", "", max_value=None, min_value=-500000)
                print ("----------------------------------")
                high = int_input_de("was soll das maximum sein?:", "", max_value=500000)
                if low > high:
                    print ("----------------------------------")
                    print("das minimum kann nicht mehr als das maximum sein")
                    print ("----------------------------------")
                else:
                    break
            print ("----------------------------------")
            number = random.randint(low,high)
            if not durchschnitt2:
                guesses = 0
                guessesnuber = int_input_de("wie viele versuch wilst du haben?:", "versuche", max_value=100)                   
                print ("----------------------------------")
                print (f"du hast {guessesnuber} versuche")
            else:
                guesses = 0
                guessesnuber = 9999999999999999999999999999
                print ("----------------------------------")
                print (f"du hast {guessesnuber} versuche")
            while True:
                guess = int_input_de(f"nummer zwischen ({low} - {high}):", "")
 
                guesses = guesses+1
             
                if guess > high:
                    print (f"das ist mehr als {high}")
                elif guess < low:
                    print(f"das ist weniger als {low}")
                elif guess > number:
                    print (f"{guess} ist zu viel")
                elif guess < number:
                    print (f"{guess} ist zu wenig")
                else:
                    print (f"{guess} ist richtig!")
                    break
                if guesses == guessesnuber:
                    print (f"du hast zu viele versuche gebraucht")
                    break
                else:
                    print (f"du hast noch {guessesnuber-guesses} versuche")
                if guess < number and not guess < low:
                   low = guess
                elif guess > number and not guess > high:
                    high = guess
                print ("----------------------------------")
            if guess == number:
                print (f"du hast {guesses} versuche gebraucht")
                if durchschnitt2:
                    if 1 <= runde <= 15:
                        werte[runde-1] = guesses
                        if runde == 1:
                            durchschnitt1 = guesses
                        else:
                            durchschnitt1 += guesses
                     
            elif guesses == guessesnuber:
                print (f"du hast es nicht eraten die numer war {number}")
        if durchschnitt2:
            durchschnitt = durchschnitt1/runden   
            print (f"dein durchschnitt ist {durchschnitt}")
        if not input ("nochmal spielen? (ja/nein):").lower() == "ja":
            runig = False
        else:
            print ("----------------------------------")
def englisch():
    runig = True
    while runig:
        runden = int_input("how many rounds woud you like to play?:", "rounds", max_value=15)
        for runde in range (runden):
            runde = runde + 1
            print ("----------------------------------")
            print (f"round {runde}")
            while True:
                low = int_input("waht woud you like to be the minimum?:", "", max_value=None, min_value=-500000)
                print ("----------------------------------")
                high = int_input("waht woud you like to be the maximum?:", "", max_value=500000)
                if low > high:
                    print ("----------------------------------")
                    print("das minimum kann nicht mehr als das maximum sein")
                    print ("----------------------------------")
                elif high < low:
                    break
            print ("----------------------------------")
            number = random.randint(low,high)
            if not durchschnitt2:
                guesses = 0
                guessesnuber = int_input("wie viele versuch wilst du haben?:", "versuche", max_value=100)                   
                print ("----------------------------------")
                print (f"du hast {guessesnuber} versuche")
            else:
                guesses = 0
                guessesnuber = 9999999999999999999999999999
                print ("----------------------------------")
                print (f"du hast {guessesnuber} versuche")
            while True:
                guess = int_input(f"nummer zwischen ({low} - {high}):", "")
 
                guesses = guesses+1
             
                if guess > high:
                    print (f"das ist mehr als {high}")
                elif guess < low:
                    print(f"das ist weniger als {low}")
                elif guess > number:
                    print (f"{guess} ist zu viel")
                elif guess < number:
                    print (f"{guess} ist zu wenig")
                else:
                    print (f"{guess} ist richtig!")
                    break
                if guesses == guessesnuber:
                    print (f"du hast zu viele versuche gebraucht")
                    break
                else:
                    print (f"du hast noch {guessesnuber-guesses} versuche")
                if guess < number and not guess < low:
                   low = guess
                elif guess > number and not guess > high:
                    high = guess
                print ("----------------------------------")
            if guess == number:
                print (f"du hast {guesses} versuche gebraucht")
                if durchschnitt2:
                    if 1 <= runde <= 15:
                        werte[runde-1] = guesses
                        if runde == 1:
                            durchschnitt1 = guesses
                        else:
                            durchschnitt1 += guesses
                     
            elif guesses == guessesnuber:
                print (f"du hast es nicht eraten die numer war {number}")
        if durchschnitt2:
            durchschnitt = durchschnitt1/runden   
            print (f"dein durchschnitt ist {durchschnitt}")
        if not input ("nochmal spielen? (ja/nein):").lower() == "ja":
            runig = False
        else:
            print ("----------------------------------")
def italienisch():
    runig = True
    while runig:
        while True:
            runden = int(input("quanti giri vuoi fare?:"))
            if runden > 20:
                print ("20 giri massimo")
            else:
                break
 
        for runde in range (runden):
            runde = runde + 1
            print ("----------------------------------")
            print (f"giro {runde}")
            while True:
                while True:
                    low = int(input("Quanto vuoi mettere per il minimo?:"))
                    if low < -500000:
                        print ("al minimo -500,000")
                    else:
                        break
                print ("----------------------------------")
                while True:   
                    high = int(input("quanto vuoi mettere come il massimo?:"))
                    if high > 500000:
                        print ("massimo 500,000")
                    else:
                        break
                if low > high:
                    print ("----------------------------------")
                    print("il minimo non può essere più che il massimo")
                    print ("----------------------------------")
                else:
                    break
            print ("----------------------------------")
            guesses = 0
            number = random.randint(low,high)
            guessesnuber = int(input("quanti tentativi vuoi avere?:"))
            print ("----------------------------------")
            print (f"hai {guessesnuber} tentativi")
            while True:
                guess = int(input(f"numero fra ({low} - {high}):"))
                guesses = guesses+1
         
                if guess > high:
                    print (f"è più che {high}")
                elif guess < low:
                    print(f"è meno che  {low}")
                elif guess > number:
                    print (f"{guess} è troppo alto")
                elif guess < number:
                    print (f"{guess} è troppo basso")
                else:
                    print (f"{guess} è giusto!")
                    break
                if guesses == guessesnuber:
                    print (f"hai fatto troppi tentativi")
                    break
                else:
                    print (f"hai ancora {guessesnuber-guesses} tentativi")
                if guess < number and not guess < low:
                    low = guess
                elif guess > number and not guess > high:
                    high = guess
                print ("----------------------------------")
            if guess == number:
                print (f"in questo giro hai avuto bisogno di {guesses} tentativi")
            elif guesses == guessesnuber:
                print (f"non l'hai indovinato, il numero era: {number}")
        if not input ("gioca di nuovo? (sì/no):").lower() == "si":
            runig = False
        else:
            print ("----------------------------------")
while True:
    sprache = input("language?(eng/de/it):").lower()
    if sprache == "eng":
        print ("the game is now in english")
        if input ("do you want to calculate an average? (you will have infinite trys)(yes/no):").lower() == "yes":
            durchschnitt2 = True  
        englisch()
        break
    elif sprache == "de":
        print ("das spiel is jetzt auf deutsch")
        if input ("wilst du einen durchschnitt berechnen? (du wirst unendlich viele versuche haben)(ja/nein):").lower() == "ja":
            durchschnitt2 = True
        deutsch()
        break
    elif sprache == "it":
        print ("il gioco continua in italiano")
        italienisch()
        break
    else:
        print('please enter a valid language')
        print ("---------------------------")
Reply
#10
NOT DONE
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  If I need to do regex replacement 27000 times, how to shorten it? tatahuft 4 876 Dec-26-2024, 01:51 AM
Last Post: deanhystad
  How to add multi-line comment section? Winfried 2 1,403 Jun-04-2024, 07:24 AM
Last Post: Gribouillis
  python multiple try except block in my code -- can we shorten code mg24 10 15,476 Nov-10-2022, 12:48 PM
Last Post: DeaD_EyE
  Want to shorten the python code shantanu97 3 2,101 Apr-25-2022, 01:12 PM
Last Post: snippsat
  Append data to Yaml section tbaror 0 8,862 Feb-09-2022, 06:56 PM
Last Post: tbaror
  Create an isolated section in bash? yxk 1 2,611 Feb-27-2020, 11:16 AM
Last Post: Larz60+
  Best section to do a while loop in my code mrapple2020 0 2,153 Apr-15-2019, 01:14 AM
Last Post: mrapple2020
  ConfigParser.NoSectionError: No section: 'Default' degenaro 1 16,471 Jun-08-2018, 08:33 PM
Last Post: ljmetzger
  How to shorten the size of program garikhgh0 11 8,202 Feb-22-2018, 06:35 PM
Last Post: snippsat
  Help understanding code section raz631 4 4,173 Dec-14-2017, 09:32 PM
Last Post: raz631

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020