from argparse import ArgumentParser
import re
import os
import sys

parser = ArgumentParser(description='This script will insert space when a character is capital and then the following is lower case\n\r'+
						"How to Run?\n" +
						"python3 " + sys.argv[0] + " -i=input.txt"
						)
parser.add_argument("-i", "--input", dest="inputfile",
                    help="provide .txt file name",required=True)


args = parser.parse_args()

inputfile = args.inputfile

#open file using open file mode
fp1 = open(inputfile, "r", encoding='utf-8') # Open file on read mode -- input file
lines = fp1.read().split("\n") # Create a list containing all lines
fp1.close() # Close file

for line in lines:
	line = re.sub(r'([a-z])([A-Z])', r'\1 \2', line)
	line = re.sub(r'([0-9])([A-z])', r'\1 \2', line)
	line = re.sub(r' [A-Z]', lambda m: m.group(0).lower(), line)
	print(line)
ab0218a3b1c3f4e08c39ec101dacfc2e8aca4455
<mask token>

<mask token>
parser.add_argument('-i', '--input', dest='inputfile', help=
    'provide .txt file name', required=True)
<mask token>
fp1.close()
for line in lines:
    line = re.sub('([a-z])([A-Z])', '\\1 \\2', line)
    line = re.sub('([0-9])([A-z])', '\\1 \\2', line)
    line = re.sub(' [A-Z]', lambda m: m.group(0).lower(), line)
    print(line)

<mask token>
parser = ArgumentParser(description=
    'This script will insert space when a character is capital and then the following is lower case\n\r'
     + 'How to Run?\n' + 'python3 ' + sys.argv[0] + ' -i=input.txt')
parser.add_argument('-i', '--input', dest='inputfile', help=
    'provide .txt file name', required=True)
args = parser.parse_args()
inputfile = args.inputfile
fp1 = open(inputfile, 'r', encoding='utf-8')
lines = fp1.read().split('\n')
fp1.close()
for line in lines:
    line = re.sub('([a-z])([A-Z])', '\\1 \\2', line)
    line = re.sub('([0-9])([A-z])', '\\1 \\2', line)
    line = re.sub(' [A-Z]', lambda m: m.group(0).lower(), line)
    print(line)

from argparse import ArgumentParser
import re
import os
import sys
parser = ArgumentParser(description=
    'This script will insert space when a character is capital and then the following is lower case\n\r'
     + 'How to Run?\n' + 'python3 ' + sys.argv[0] + ' -i=input.txt')
parser.add_argument('-i', '--input', dest='inputfile', help=
    'provide .txt file name', required=True)
args = parser.parse_args()
inputfile = args.inputfile
fp1 = open(inputfile, 'r', encoding='utf-8')
lines = fp1.read().split('\n')
fp1.close()
for line in lines:
    line = re.sub('([a-z])([A-Z])', '\\1 \\2', line)
    line = re.sub('([0-9])([A-z])', '\\1 \\2', line)
    line = re.sub(' [A-Z]', lambda m: m.group(0).lower(), line)
    print(line)

from argparse import ArgumentParser
import re
import os
import sys

parser = ArgumentParser(description='This script will insert space when a character is capital and then the following is lower case\n\r'+
						"How to Run?\n" +
						"python3 " + sys.argv[0] + " -i=input.txt"
						)
parser.add_argument("-i", "--input", dest="inputfile",
                    help="provide .txt file name",required=True)


args = parser.parse_args()

inputfile = args.inputfile

#open file using open file mode
fp1 = open(inputfile, "r", encoding='utf-8') # Open file on read mode -- input file
lines = fp1.read().split("\n") # Create a list containing all lines
fp1.close() # Close file

for line in lines:
	line = re.sub(r'([a-z])([A-Z])', r'\1 \2', line)
	line = re.sub(r'([0-9])([A-z])', r'\1 \2', line)
	line = re.sub(r' [A-Z]', lambda m: m.group(0).lower(), line)
	print(line)