import os # Clear screen os.system("clear") # Mac or Linux #os.system("cls") # Windows userInput = input("Input a longer string: ") # Print substring, from start to position 3 of userInput print(userInput[:3])