I'm trying to print the uid which is greater than max_uid, but I have the following error. Can someone let me know what I'm missing here ?
max_uid = 0
for line in open("/etc/passwd"):
split = line.split(":")
if int(split[2]) > max_uid:
max_uid = int(split[2])
print(max_uid)
Thanks in advance
:, so it doesn't get split into 3 parts