I am looking for a way to get system serial number using python.
Below is the command to get serial number using command prompt:
wmic bios get serialnumber
Is there any python library to get the same?
Yes, you can run shell commands via subprocess
import subprocess
subprocess.check_output('wmic bios get serialnumber').decode("utf-8")
You should get something like
SerialNumber \r\r\n< cencored > \r\r\n\r\r\n'
For more see this SO answer