Getting Operating System name and IP Address using Python

import platform, socket os, bit = platform.system(), platform.architecture()[0] ipAddress = socket.gethostbyname(socket.gethostname()) # getting OS print("Operating System:",os, bit) # getting ip address print("IP Address:", ipAddress)

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.