Create all possible character combinations of any size
Improvements


Use either argparse or sys.argv because this feels just wierd,
and kind of surprised it worked at all. I'd recommend sticking with argparse
Secondly, be sure to check out the itertools module from python, because what you are looking for are basicly permutations of a word.




New code

import argparse
from itertools import permutations


def main(string):
    for idx in range(1, len(string)+1):
        print(list(''.join(p) for p in permutations(string, idx)))


def parse_args():
    """parsing argument"""
    parser = argparse.ArgumentParser()
    parser.add_argument('-input', dest='input', type = str,
                         required = True,
                         help = "please provide string")
    return parser.parse_args()


if __name__ == "__main__":
    args = parse_args()
    main(args.input)