https://letuscrack.com/substring-printer-c-python-convertion/
Substring Printer c-python convertion