a, b = map(int, input().strip().split(' ')) print(a//b,a%b)
I want to divide a by b, divide a by b, and I want to print the rest, but why can't I print it out with the code above?<
input
To write split
, you must not turn the parameter over at all or pass the separator.
split('')
won't work.
Use split()
if you want to split based on spaces
© 2024 OneMinuteCode. All rights reserved.