The import OS
I=1
I & lt; 255
Print (OS) system (' ping - n 1 192.168.1. '+ STR (I)))
I=I + 1
I=I + 1
^
System of execution results suggest: unexpected imdent, how to join the cycle and save the corresponding results, thank you!
CodePudding user response:
According to your code, like below:I=1While I & lt; 255:
Print (OS) system (' ping - n 1 192.168.1. '+ STR (I)))
I=I + 1
But the meaning of this code is, ping 192.168.1.1 to 192.168.1.254, a total of 254 IP addresses, and that it will open 254 CMD window,,,,
This is the result you want?
CodePudding user response:
Indentation is not correctCodePudding user response:
Thank you very much!