Metadata-Version: 2.1
Name: mrange
Version: 0.4
Summary: Reduce nested for i in range(n) loops to a single line
Home-page: https://github.com/Ntropic
Download-URL: https://github.com/Ntropic/mrange/archive/refs/tags/v0.3.tar.gz
Author: Michael Schilling
Author-email: michael@ntropic.de
License: MIT
Keywords: nested,loops
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

# mrange

Install via `pip install mrange`

Import via
`from mrange import mrange`

## Description
mrange is used to remove nested range loops
### Input: 
`n_s = (n_1, n_2, ..., n_m)` 
Tuple of integers
### Output: 
Generator outputting `len(n_s)` values with every call, generating every combination of values in the intervals `[0,1,...,n_s[i]-1]`
### Use:
```
for a, b, ..., m in mrange((n_a, n_b, ..., n_m)):
    ...
Replaces:
for a in range(n_a):
    for b in range(n_b):
       ...
           for m in range(n_m):
               ...
```
## Authors: 
By Michael Schilling, with the help of Francesco Preti

