So i tried to read a number from a digit for example
integer_var = 12345679
i want to read it from 5 to 8 digit. So the output will be like this
Last 4 Digits = 5679
i've tried with int(str(integer_var)[:-4]
but the output is 123
Here is my code:
integer_var = 12345679
result = int(str(integer_var)[:-4])
print("Last 4 Digits = ", result)