I have an exercise where i have an input of a number with six characters
input = 567809
How do i extract 2 digits from the middle of this? like, i know that i can get the first two numbers if i use
first2 = int(str(input)[:2])
also for the first 4 numbers if i want to
But how do i get the 2 last and the 2 middle numbers??
i want to have an proper code where the input is segmented like :
first2 = 56
middle = 78
last = 09