weap_acc = [''] * 50



# here, range generates 1, 2, 3, 4

for count in range(1, 5):

weap_acc[count - 1] = "%.3f" % weap_rng[0]

c_str = str(count)



# 16, because range doesn't give the endpoint

for count in range(5, 16):

weap_acc[count - 1] = "%.3f" % (weap_rng[0] + (acc_delta[0] * (count - 4)))

c_str = str(count)



if choice in ('pawn', 'weapon', 'both'):



Thanks for uploading to Github.You can do several things to improve the structure of your code, making it more readable and idiomatic.Minor point is that snake_case is more common variable and function naming convention than CamelCase (or camelCase). On the other hand, names starting with capital letters are often used for class names, so when people see SomeFunction, they might assume it's a class and be confused. Especially that objects can be callable. So people reading your 'Main.py' are going to assume that ShooterAccuracy and WeaponAccuracy you're importing are classes.Instead, you can writeWhat you're doing is initializing a list containing an empty string, then multiplying that list by 50, so it becomes a list containing 50 empty strings. It's one of the few examples where Python is not strict about strong typing. Sometimes you accidentally multiply a list by number without knowing it's a list, which can lead to bugs. But for cases like yours the feature is very, very convenient. You don't have to count how many empty strings are there.Second, you need to learn about python'sloop, which is nice because it lets you forget about manual indexes for the most part. Using your own counter variables often leads to off-by-one errors. 'for' loop in python iterates once per item in iterable (because it doesn't have to be a collection, a sequence, or anything ordered, or can be dynamically generated).When you don't have anything to iterate over, but you want to iterate a specific number of times, you can use theloop together with thefunction. range(10) returns an iterator equivalent to [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]. Note the endpoint is not included, so in the mathematical notation range(10) would be equivalent to <0, 10) or <0, 9>. Range can be given an extra argument to tell it where it starts: range(start, stop). Normally it's treated as range(0, stop)To wrap it up, you can rewrite your lines:Note when using 'range', you don't have to manually update the 'count' variable every iteration.I understand that "c_str" is modified in every iteration because of the currently commented out line that you sometimes toggle to debug your program.Similarly, you can rewrite this section:Lines 36, 37 seem redundant in your code and are certainly not needed in the new lines.Save "while" loop for things which can't be simply expressed by a for loop, such as a 'do...while' loop, or when you use non-trivial sentinel variables.You can rewrite this line as:In all the 3 cases, you call Exit(). So move it out of the 'if' section, put it right at the end of the file. No need to repeat yourself.