{}
run-icon
main.py
# Online Python compiler (interpreter) to run Python online. # Write Python 3 code in this online editor and run it. class NumberTools: def __init__(self): pass def counter(rbegin: int, rend: int, **options): try: flat = bool(options['flat']) except KeyError: flat = False rbegin = int(rbegin) rend = int(rend) orange = list(range(rbegin, rend+1)) if not flat: for i in orange: print(i, end=", " if i != rend else "") else: for i in orange: print(i) NumberTools.counter(1, "", flat=True)
Output